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

SWQL Query Integer Conversion

$
0
0

Hello,

     I am trying to create a custom query that polls a custompoller and returns a numeric value (as text) for the percent of battery load. The trouble I am having is attempting to convert the text field to an integer so it can properly sort the numbers. I have tried cast and convert, but SWQL does not seem to understand the integer property. Does anyone have another workaround that could be used? Thank you.

SELECT N.SysName, CPS.Status

FROM Orion.NPM.CustomPollerAssignment CPA

Inner Join Orion.NPM.CustomPollers CP on CP.CustomPollerID = CPA.CustomPollerID

Inner Join Orion.NPM.CustomPollerStatus CPS on CPS.CustomPollerAssignmentID = CPA.CustomPollerAssignmentID

Inner join Orion.Nodes N on N.NodeID = CPA.NodeID

where UniqueName = 'upsAdvOutputLoad'

order by CPS.Status desc


Viewing all articles
Browse latest Browse all 3719

Latest Images

Trending Articles



Latest Images

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