Hi Guys,
Please I have an issue. I am trying to write an SQL code to generate daily historical node availability and percentage loss.
I want to do it in a way that I will paste this code in the Advanced DataBase Query (SWQL/SQL) side of the Orion Web Console where one can paste SQL codes.
Kindly see what I mean below.
Also, see the codes below:
IF (DatePart (weekday, GETDATE()) <> 7 AND DatePart(weekday, GETDATE()) <> 1)
BEGIN
SELECT TOP 10000 Nodes.Caption AS NodeName,
Nodes.Location AS Location,
AVG(ResponseTime.PercentLoss) AS AVERAGE_of_Percent_Loss,
AVG(ResponseTime.Availability) AS AVERAGE_of_Availability
FROM
Nodes INNER JOIN ResponseTime ON (Nodes.NodeID = ResponseTime.NodeID)
WHERE
((DatePart(Hour,weekday) >= 8) AND (DatePart(Hour,weekday) <= 18))
AND
(
(Nodes.Caption LIKE '%%routers%%') AND
)
GROUP BY Nodes.Caption, Nodes.Location
END
====================================================================================
My question is that the code did not run and I do not know where the error or errors are located.
Any ideas?
Please I need help.
Regards,
David.