Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

How do I limit the scope of a query to the current node?

$
0
0

I am trying the following:

 

SELECT CS.RowID as RowID, IsNull(CS.Status, 0) as Value

FROM Orion.NPM.CustomPollerStatus CS

INNER JOIN Orion.NPM.CustomPollerAssignment CA ON CA.CustomPollerAssignmentID = CS.CustomPollerAssignmentID

WHERE (CA.CustomPollerID='E200B54B-C47B-42F7-89C6-5F0784724C0A') AND (CA.NodeID=${N=SwisEntity;M=NodeID})

 

But I cet an error message: "mismatched input '=' expecting ')' in Where clause"

 

If I try "AND (CA.NodeID=${NodeId}) the statement is ignored and all rows returned.

 

If I try the same with SQL:

 

SELECT CS.RowID as RowID, IsNull(CS.Status, 0) as Value

FROM CustomPollerStatus CS

INNER JOIN CustomPollerAssignment CA ON CA.CustomPollerAssignmentID = CS.CustomPollerAssignmentID

WHERE (CA.CustomPollerID='E200B54B-C47B-42F7-89C6-5F0784724C0A') AND (CA.NodeID=${NodeId})

 

I get "Query not valid".

None of the macro vaiants work for either SQL or SWQL queries....


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>