Hello,
I am trying to convert the following SQL query into SWQL. Any assistance would be appreciated. There should be 4 columns named Last Up, Node Name, Note Date, and Note. It should only show one line for each node with the most recent note.
SELECT InterfaceLastChange as [Change Time], REPLACE(NODE.CAPTION, '-F', '') AS [Node], Note, NodeNote.Timestamp as [Note Time],
CONCAT('https://orion/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:', NODE.NODEID) AS [DetailsUrl]
FROM Nodes Node
INNER JOIN Interfaces NodeIf
ON Node.NodeID = NodeIf.NodeID
OUTER APPLY (
SELECT TOP 1 * FROM [NodeNotes] WHERE NODE.NODEID = NODEID ORDER BY NodeNoteID DESC
) NodeNote
WHERE Node.Caption LIKE 'SUS%-F' AND IfName = 'GS_DA2-P1' AND NodeIf.Status = '2'
ORDER BY InterfaceLastChange ASC