labtech
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_CleanupNetworkDevices
Parameters
Name
Type
Mode
Definition
BEGIN DROP TEMPORARY TABLE IF EXISTS tempComputers; CREATE TEMPORARY TABLE tempComputers(PRIMARY KEY Computerid(computerid)) SELECT computerid,locationid FROM computers; DELETE nd FROM networkdevices nd INNER JOIN inv_networkcard nc ON nc.mac = nd.mac INNER JOIN tempComputers c ON (nd.locationid=c.locationid AND c.computerid=nc.computerid) WHERE nd.mac <> ''; DROP TEMPORARY TABLE IF EXISTS tempComputers; END