labtech
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
FillCompStatsHourlyGaps
Parameters
Name
Type
Mode
Definition
BEGIN INSERT INTO h_computerstatshourly(`ComputerID`, `CPU`, `MaxCPU`, `MinCPU`, `MEM`, `MaxMEM`, `MinMEM`, `DataIn`, `DataOut`, `EventDate`, `EventHour`, `Samples`, `LastUpdate` ) SELECT c.ComputerID, 0, 0, 0, 0, 0, 0, 0, 0, CURDATE(), HOUR(NOW()), 1, NOW() FROM computers c LEFT JOIN h_computerstatshourly h ON c.ComputerID = h.ComputerID AND CURDATE() = h.EventDate AND HOUR(NOW()) = h.EventHour where h.EventHour is null; END