I am trying to work on a report to show all interfaces that are currently up in our environment but do not have a description on the port. I can run this query with only selection one interface that contains gi1.
SELECT TOP 10000 Nodes.Caption AS NodeName,
Interfaces.Caption AS Interface_Caption
FROM
Nodes INNER JOIN Interfaces ON (Nodes.NodeID = Interfaces.NodeID)
WHERE
(
(Nodes.Device_Type = 'Switch') AND
(Interfaces.Caption LIKE '%gi1%')
)
When I add Multiple Interfaces it will not detect anything
SELECT TOP 10000 Nodes.Caption AS NodeName,
Interfaces.Caption AS Interface_Caption
FROM
Nodes INNER JOIN Interfaces ON (Nodes.NodeID = Interfaces.NodeID)
WHERE
(
(Nodes.Device_Type = 'Switch') AND
(Interfaces.Caption LIKE '%gi1%') AND
(Interfaces.Caption LIKE '%gi2%') AND
(Interfaces.Caption LIKE '%gi3%') AND
(Interfaces.Caption LIKE '%gi0%') AND
(Interfaces.Caption LIKE '%fa0%') AND
(Interfaces.Caption LIKE '%fa1%') AND
(Interfaces.Caption LIKE '%fa2%') AND
(Interfaces.Caption LIKE '%gi4%') AND
(Interfaces.Caption LIKE '%te1%') AND
(Interfaces.Caption LIKE '%te2%')
)