1 Reply Latest reply on Aug 20, 2018 8:15 AM by jblankjblank

    SWQL Query working on Orion but not EOC

    mwb

      Can anyone point me in the right direction why this boiled down bit of SWQL code would work fine from one of the Orion instances, but fail when trying to run from EOC against all those same Orion instances?

       

      select rt.Node.Caption, Min(DateTime) as First, Max(DateTime) as Last from Orion.ResponseTime rt
      
      where rt.Availability<>100
      and DateTime>ADDDATE('HOUR', -1, GETDATE())
      
      Group By rt.Node.Caption

       

      The error indicates "Subquery column with 'PropertyRef/T2.C4' not found".

        • Re: SWQL Query working on Orion but not EOC
          jblankjblank

          mwb the federated SWIS can be a bit different in some cases.  Try this query - see if that helps.  

           

           

          SELECT Caption, MIN(ResponseDateTime) AS First, MAX(ResponseDateTime) AS Last

          FROM(

          SELECT rt.Node.Caption as Caption, rt.DateTime as ResponseDateTime

          FROM Orion.ResponseTime rt 

          WHERE rt.Availability<>100 

          AND DateTime >ADDDATE('HOUR', -1, GETDATE()) 

          )

          GROUP BY Caption