Try prefixing the Maxbps_In95 with AA?
Sorry, I am not very fluent in SQL...when you say prefix the Maxbps_In95 with AA do you mean like AA_Maxbps_In95 or something else? I tried doing that to all the Maxbps_In95 references but end up with the same error when running the report from the web console.
Actually I misread - it's RESULT_IN, not AAA. Here is the query with the updates.
DECLARE @StartDate DateTime
DECLARE @EndDate DateTime
SET @StartDate = CAST((ROUND(CAST(GetDate() - 30 AS FLOAT), 0, 1)) as datetime)
SET @EndDate = GetDate()
Nodes.Caption AS NodeName,
Interfaces.InterfaceName AS Interface_Name,
INNER JOIN Interfaces
ON (Nodes.NodeID = Interfaces.NodeID)
SELECT InterfaceID, dbo.GetInBps95th(AA.InterfaceID, @StartDate, @EndDate) AS Maxbps_In95
SELECT DISTINCT A.InterfaceID
FROM dbo.InterfaceTraffic A
WHERE A.DateTime >= @StartDate AND A.DateTime <= @EndDate
) AS AA
) as RESULT_IN
ON (dbo.Interfaces.InterfaceID = RESULT_IN.InterfaceID)
WHERE Interfaces.InterfaceType = 129 AND Nodes.NodeID = 122
ORDER BY RESULT_IN.Maxbps_In95 DESC
That worked. Thank you very much!
You're very welcome.