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.

Assistance with Report Script

I currently have a report that is based on the events table. However, I need to add via join the ability to filter based on the interfaces table. Can anyone help?

Thank you

Here is the original report script. I need to be able to filter this report from the following data in the interfaces table.

interfaces.IUM like '0'

SELECT   Nodes.Caption AS NodeName,
StartTime.EventTime,
StartTime.Message,
DATEDIFF(Mi, StartTime.EventTime,
    (SELECT TOP 1
        EventTime
        FROM Events AS Endtime
        WHERE EndTime.EventTime > StartTime.EventTime
            AND EndTime.EventType = 5001
            AND EndTime.NetworkNode = StartTime.NetworkNode
            ORDER BY EndTime.EventTime)) AS OutageDurationInMinutes

FROM Events StartTime INNER JOIN Nodes ON StartTime.NetworkNode = Nodes.NodeID
WHERE

(StartTime.EventType = 5000)
AND 
(StartTime.Message LIKE '%Utilization%')
AND
StartTime.EventTime between dateadd (day,-7, getdate()) and getdate()
AND
((((nodes.caption like '%DRO%')
OR
(nodes.caption like '%DSW%')
OR
(Nodes.caption like '%CRO%')
OR
(Nodes.caption like '%CSW%'))))

ORDER BY 2 DESC