cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 14

Unmanaged Node List Using Custom Query Resource

I'm trying to get my Unmanage Resource to sort by Unmanaged From.  I've tried different things and it keeps erroring out.  This is what I have now, without the attempt I made sorting by UnmanagedFrom. Can anyone take a look and see if they can assist?

SELECT

    NodeName AS [Node Name],

        '/Orion/images/StatusIcons/Small-' + StatusIcon AS [_IconFor_Node Name],

        DetailsUrl AS [_LinkFor_Node Name], MAX(ToLocal(Nodes.UnmanageFrom)) AS [Unmanaged From], MAX(ToLocal(Nodes.UnmanageUntil)) AS [Unmanaged Until]

FROM Orion.Nodes

WHERE UNMANAGED = 1

GROUP BY NodeName, StatusIcon, DetailsUrl, Nodes.CustomProperties.Alert_Team, Nodes.CustomProperties.Business_Function

ORDER BY NodeName

Labels (1)
0 Kudos
1 Reply
Level 13

Try adding in the Join

SELECT

    NodeName AS [Node Name],

        '/Orion/images/StatusIcons/Small-' + StatusIcon AS [_IconFor_Node Name],

        DetailsUrl AS [_LinkFor_Node Name], MAX(ToLocal(Nodes.UnmanageFrom)) AS [Unmanaged From], MAX(ToLocal(Nodes.UnmanageUntil)) AS [Unmanaged Until]

FROM Orion.Nodes 

INNER JOIN orion.NodesCustomProperties cp on cp.NodeID = Nodes.NodeID

WHERE UNMANAGED = 1

GROUP BY NodeName, StatusIcon, DetailsUrl, cp.Alert_Team, cp.Business_Function

ORDER BY NodeName

0 Kudos