2 Replies Latest reply on Jul 22, 2014 3:42 PM by upaymeifixit

    New to Orion Report Writer. SQL Syntax help

    upaymeifixit

      I'm very new to Solarwinds Orion, and even newer to the Orion Report Writer (also new to the forum, so if this is not the correct place to be posting, please assist me in finding the correct forum). I am trying to create a report which will show the top three application's Netflow traffic for each WAN router. Similar to the attached screenshot, but for each WAN router.

       

      I am using the below code, but am getting the error "Ambiguous column name 'DateTime'.". Anybody have any ideas?

       

      SELECT  TOP 10000
      Nodes.NodeID                                 AS NodeID,
      Nodes.Caption                                AS NodeName,
      NetflowApplicationSummary.AppName            AS Application_Name,
      SUM(NetflowApplicationSummary.TotalBytes)    AS SUM_of_Bytes_Transferred,
      AVG(Case OutBandwidth
          When 0 Then 0
          Else (Out_Averagebps/OutBandwidth) * 100
      End)                                         AS AVERAGE_of_Xmit_Percent_Utilization
      
      FROM
      (NetflowApplicationSummary INNER JOIN Nodes ON (NetflowApplicationSummary.NodeID = Nodes.NodeID)) INNER JOIN InterfaceTraffic ON (Nodes.NodeID = InterfaceTraffic.InterfaceID)
      
      WHERE
      ( DateTime > (GetDate()-30) )
      AND
      (Nodes.WANCircuit = 1)
      
      GROUP BY Nodes.Caption, NetflowApplicationSummary.AppName
      
      ORDER BY 3 DESC
      

       

      swo.png

        • Re: New to Orion Report Writer. SQL Syntax help
          HolyGuacamole

          You probably want to move this to the Netflow Traffic Analyzer forum or Report Lab forum.

          The SQL query is cut off on the right in your screenshot. It looks like the DateTime column is present in multiple tables involved in the query. If you change it to


          WHERE 

          ( NetflowApplicationSummary.DateTime > (GetDate()-30) ) 

          AND 


          it should work.


          If you are running NTA v4, you should be able to design this in the web based reports as opposed to the legacy report writer on the NTA server.