labtech
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_AutoJoinComputersFromContacts
Description
Join Computers into groups
Parameters
Name
Type
Mode
Definition
BEGIN INSERT IGNORE INTO SubGroups (SELECT GroupID, c.ComputerID FROM SubGroupsContacts JOIN MasterGroups m USING (GroupID) JOIN Contacts ct USING (ContactID) JOIN Computers c USING (ContactID) WHERE m.ContactJoinOptions & 2 = 2); INSERT IGNORE INTO SubGroups (SELECT GroupID, cc.ComputerID FROM SubGroupsContacts JOIN MasterGroups m USING (GroupID) JOIN Contacts ct USING (ContactID) JOIN ContactComputers cc USING (ContactID) WHERE m.ContactJoinOptions & 2 = 2); CALL sp_AutoRemoveComputersMasterTrump(); END