Trying to add a sql filter for a custom property
called "IsTenant' to reduce the number of nodes listed during the query.
Below is the updated sql query that says it has a "xxxxxxxx" error
when testing in report writer but seems to work when using it in a Microsoft
SQL workspace.
SET NOCOUNT OFF SET ROWCOUNT 0 DECLARE @StartDate DateTime
DECLARE @EndDate DateTime SET @StartDate = CAST((ROUND(CAST(GetDate() - 7 AS
FLOAT), 0, 1)) as datetime) SET @EndDate = GetDate() SELECT
Interfaces.InterfaceId, Nodes.NodeID, Nodes.Caption AS NodeName,
Nodes.VendorIcon AS Vendor_Icon, Interfaces.Caption AS Interface_Caption,
Interfaces.InterfaceIcon AS Interface_Icon, Maxbps_In95, Maxbps_Out95,
Maxbps_95 FROM Nodes INNER JOIN Interfaces ON Nodes.NodeID = Interfaces.NodeID
INNER JOIN ( SELECT InterfaceID, dbo.GetInBps95th(InterfaceID, @StartDate,
@EndDate) AS Maxbps_In95, dbo.GetOutBps95th(InterfaceID, @StartDate, @EndDate)
AS Maxbps_Out95, dbo.GetMaxBps95th(InterfaceID, @StartDate, @EndDate) AS
Maxbps_95 FROM InterfaceTraffic WHERE InterfaceTraffic.DateTime >=
@StartDate AND InterfaceTraffic.DateTime <= @EndDate SELECT InterfaceID,
IsTenant FROM dbo.Interfaces WHERE IsTenant=1 GROUP BY InterfaceID )
TrafficStat ON Interfaces.InterfaceID = TrafficStat.InterfaceID WHERE
${LIMITATION} ORDER BY NodeName, Interface_Caption .