7 Replies Latest reply on Aug 26, 2013 3:30 PM by rlane2012

    SWQL Query Integer Conversion



           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