SELECT
N.NodeID AS NodeID,
Interfaces.InterfaceID AS InterfaceID,
N.StatusLED AS Status_Icon,
N.Caption AS NodeName,
Interfaces.StatusLED AS Status_Icon_1,
Interfaces.Caption AS Interface_Caption,
MAX(E.EventTime) AS DownTime,
Cast(DateDiff(day,MAX(E.EventTime),getdate()) as varchar) + ' Day(s) ' + convert(char(8),dateadd(second,DateDiff(second,MAX(E.EventTime),getdate()),0),14) as Duration
FROM
Nodes N INNER JOIN Interfaces
Nodes N INNER JOIN Events E
ON
N.NodeID = E.NetworkNode
N.NodeID = Interfaces.NodeID
WHERE
(
(Interfaces.Status >= '2') AND
(
NOT (Interfaces.NodeID = 0))
)
为什么它不起作用?任何建议