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 working on Orion but not EOC

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".

  • 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