7 Replies Latest reply on Sep 10, 2015 10:43 AM by bhilgenkamp_botw

    Please help to conver SQL to SWQL

    tomjose


      Can anyone help me to convert below SQL query to  SWQL,

       

      Select Nodes.nodeID, Nodes.Caption as NodeName,Nodes.StatusDescription As Status, DATEDIFF(hh, DATEADD(hh,-5, LastSystemUpTimePollUtc), GetDate()) as [Down Time], Convert(varchar, DATEADD(hh,-5, LastSystemUpTimePollUtc),110) As [Last Date Up]

      From Nodes
      where
      Nodes.Status != '1' and
      DATEDIFF(Mi, DATEADD(hh,-5, LastSystemUpTimePollUtc), GetDate())>=180
      Order by [Down Time] Asc

       

      I am able to fetch the result on web page by using "Select Nodes.nodeID, Nodes.Caption as NodeName,Nodes.StatusDescription As Status From Orion.Nodes"

      But i am not able to find right  query for  "Down Time" and  "last date Up"