SyntaxFix
Write A Post
Hire A Developer
Questions
CASE AlarmEventTransactions.DeviceID should just be CASE.
CASE AlarmEventTransactions.DeviceID
CASE
You are mixing the 2 forms of the CASE expression.