I'm trying to write a report that will show all alerts for the last 7 days including the notes made while the alerts were active. Is this possible?
I have the alerts for the last 7 days working but can not find how to add the notes.
SQL statement, keeping in mind the report runs on Mondays.
SELECT ObjectName, Message, LogDateTime
FROM AlertLog
WHERE LogDateTime >=DATEADD(day,datediff(day,0,GetDate())-8,0) AND LogDateTime <=DATEADD(day,datediff(day,0,GetDate())-1,0) AND Message like 'Alert %'
GROUP BY ObjectName, LogDateTime, Message
Any help or guidance is appreciated.