This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Creating a report on specific triggered alerts with acknowledgement information

Hello!

I'm attempting to create a report showing triggered alert time, object, node, acnowledgement, and acknowledgement note. The problem I'm running into is that the AcknowledgedBy and AcknowledgedTime fields reside in the AlertStatusView table, where everything else is in the AlertHistoryView table. So I attempted to join the two to produce my report, and began getting Invalid Query errors. 

SELECT
h.TimeStamp,
h.EventTypeWord,
h.Name,
h.ObjectType,
h.Message,
h.AccountID,
h.AlertObjectid,
h.EntityCaption,
h.RelatedNodeCaption,
h.AlertNote,
h.Severity
s.AcknowledgedBy
s.AcknowledgedTime

FROM [SolarWindsOrion].[dbo].[AlertHistoryView (view)] h

INNER JOIN [SolarWindsOrion].[dbo].[AlertStatusView (view)] s ON s.AlertObjectID = h.AlertObjectID

WHERE h.EventTypeWord = 'Triggered' AND h.Name = 'ITG Ops - Warning - Epic Scheduled Task Failed'
Order by h.TimeStamp DESC

I am by no means proficient in SQL, but I did have the query looked over by someone who is and they think the query looks right, so I'm probably missing something specific to the SW database. Any guidance would be greatly appreciated.