labtech
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_AutoJoin
Parameters
Name
Type
Mode
Definition
BEGIN INSERT IGNORE INTO SubGroups (GroupID,ComputerID) (SELECT MasterGroups.GroupID,Searches.ComputerID FROM MasterGroups JOIN Searches ON Searches.SearchID=MasterGroups.AutoJoinScript WHERE autojoinscript>0); DELETE SubGroups FROM SubGroups JOIN Mastergroups USING (groupid) WHERE MasterGroups.LimitToParent=1 AND ComputerID NOT IN (SELECT ComputerID FROM Searches WHERE SearchID=MAstergroups.AutoJoinScript); CALL sp_AutoRemoveComputersMasterTrump(); END