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.

New to Orion Report Writer. SQL Syntax help

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

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

  • Thanks so much, that was it. Like I said, I'm very new to this, so your post helped me better understand how SQL Queries are written.

    In the future I will post threads like this in the Netflow Traffic Analyzer forum.