Count of Burglary Alarm

This query Counts the number of Burglary Alarms tripped for the account linked to the alarm received.  This is used within the SET command.  

The queries provided should be tested to ensure they meet the customer's specific needs. The company makes no guarantees regarding their accuracy or suitability.

SELECT (SELECT COUNT(*) FROM CLOG{0} WHERE EVCAT="BURG" AND EVTYPE = 1 AND SERIALNO={ME} AND LOGDATE >= DATEADD(MINUTE,-5,GETUTCDATE())

+

(SELECT COUNT(*) FROM CLOG{1} WHERE EVCAT="BURG" AND EVTYPE = 1 AND SERIALNO={ME} AND LOGDATE >= DATEADD(MINUTE,-5,GETUTCDATE())))
  • Count(*) - How many?
  • CLOG{0} - Current month's account activity.
  • CLOG{1} - Last month's account activity.
  • EVCAT="CATEGORY" - The Event Category ID, created and listed in the Manitou Supervisor Workstation.
  • EVTYPE = 1 - Looks within the Customer Activity log for only Alarm events.
  • SERIALNO={ME} - Looks for the Customer record with the matching serial number to this alarm customer.
  • LOGDATE >= DATEADD(MINUTE,-5,GETUTCDATE()) - How far back to look into the Customer Activity log for the events. (MINUTE,-5 looks back 5 minutes, from now.)