16 Replies Latest reply on Nov 7, 2017 8:02 PM by mesverrum

    Query Works in SWQL Studio But Not in Report Writer


      I have been working on a report to pull the download times for the most recent downloaded running config for devices managed by NCM.


      I managed to come up with the following query, which worked in SWQL Studio:



        N.CoreNodeID AS "Node_ID", N.AgentIP AS "IP_Addess", N.NodeCaption AS "Node_Name",

        CA.DownloadTime AS "Download_Time", CA.LastAttemptedDownloadTIme AS "Last_Successful_Download_Time",

        SI.StatusName as "Status"


        Cirrus.Nodes N INNER JOIN Cirrus.ConfigArchive CA ON N.NodeID = CA.NodeID

        INNER JOIN Orion.StatusInfo SI ON N.Status = SI.StatusID


        (CA.ConfigID = (SELECT TOP 1 CAA.ConfigID

           FROM Cirrus.ConfigArchive CAA

           WHERE CAA.NodeID = N.NodeID

           ORDER BY CAA.DownloadTime DESC)


         (CA.ConfigType = 'Running'))

      ORDER BY



      The query, however, returns "Query is not valid" when pasting it into the "Advanced Database Query" selector in the Report Writer and clicking "Preview Results."


      Does anyone have an idea why the query works in SWQL Studio, but fails when I try using it in a report?