labtech
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_AutoRemoveComputersMasterTrump
Parameters
Name
Type
Mode
Definition
BEGIN DROP TEMPORARY TABLE IF EXISTS GComp_MT; CREATE TEMPORARY TABLE GComp_MT SELECT * FROM SubGroups WHERE GroupID IN (SELECT GroupID FROM MasterGroups WHERE MASTER=0) AND ComputerID IN (SELECT ComputerID FROM SubGroups JOIN Mastergroups USING (groupid) WHERE Mastergroups.AutoJoinScript>0 AND Mastergroups.Master=1); DELETE SubGroups FROM Subgroups JOIN GComp_MT USING (ComputerID,GroupID); DROP TEMPORARY TABLE GComp_MT; END