I'm trying to figure out how to do a report in Report Writer and I'm not getting the results I expect. I'm trying to reduce the number of nodes in a report based on their Node Name. What I've done is the following
However, I still get nodes in the report with Node Names that have Router, String2 or String3 in the names. The SQL this is producing is the following:
SELECT
Nodes.NodeID AS NodeID, Nodes.MachineType AS Machine_Type, Nodes.IOSVersion AS IOS_Version, Nodes.IOSImage AS IOS_Image, Nodes.Caption AS NodeName
FROM
Nodes
WHERE
(
(Nodes.Vendor LIKE '%Cisco%') AND
(
NOT (Nodes.Caption LIKE '%Router%') OR
NOT (Nodes.Caption LIKE '%String2%') OR
NOT (Nodes.Caption LIKE '%String3%'))
)
ORDER BY 2 ASC, 3 ASC, 4 ASC
What I was expecting it to produce was
SELECT
Nodes.NodeID AS NodeID, Nodes.MachineType AS Machine_Type, Nodes.IOSVersion AS IOS_Version, Nodes.IOSImage AS IOS_Image, Nodes.Caption AS NodeName
FROM
Nodes
WHERE
(
(Nodes.Vendor LIKE '%Cisco%') AND
NOT (
(Nodes.Caption LIKE '%Router%') OR
(Nodes.Caption LIKE '%String2%') OR
(Nodes.Caption LIKE '%String3%'))
)
ORDER BY 2 ASC, 3 ASC, 4 ASC
Subtle difference, but I've confirmed by putting it into a Custom SQL report that this works. However, I don't like doing a ton of custom SQL where it isn't needed, so others can update or modify my reports easily. Wondering if there is a way to get report writer to do what I'm asking without using Custom SQL?
For the Solarwinds folks, I guess I would also ask - why are you doing it the way that you are? Seems like it would be much simpler to do it the way my SQL shows, not to mention my SQL works. :-)
Thanks!