labtech
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
PopulateCacheEventDates
Parameters
Name
Type
Mode
Definition
BEGIN INSERT INTO cacheeventdates(eventsource) SELECT 'Agents' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Agents' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Apps' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Apps' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'AuditActions' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='AuditActions' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Clients' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Clients' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'CMenus' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='CMenus' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'CCommands' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='CCommands' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Computers' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Computers' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Config' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Config' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'ConfigOutlook' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='ConfigOutlook' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Contacts' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Contacts' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'ControlCenterConfig' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='ControlCenterConfig' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'DataViewFolders' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='DataViewFolders' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'DataViews' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='DataViews' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Functions' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Functions' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Groups' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Groups' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Huds' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Huds' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Links' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Links' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Locations' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Locations' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Permissions' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Permissions' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Properties' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Properties' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Redirectors' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Redirectors' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Regions' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Regions' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'RemoteCommands' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='RemoteCommands' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'ReportFolders' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='ReportFolders' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Reports' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Reports' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'RoleDefinitions' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='RoleDefinitions' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Schedules' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Schedules' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'ScriptFolders' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='ScriptFolders' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Scripts' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Scripts' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'SensorChecks' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='SensorChecks' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Templates' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Templates' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'TicketCategory' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='TicketCategory' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'TicketData' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='TicketData' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'TimeCategory' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='TimeCategory' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'UserFolders' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='UserFolders' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'Users' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='Users' LIMIT 1); INSERT INTO cacheeventdates(eventsource) SELECT 'VirusScanners' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM cacheeventdates WHERE eventsource='VirusScanners' LIMIT 1); END