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.

SWQL Query Integer Conversion

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