To all:
I am creating a custom NCM Report using a SQL query
I am getting this error when i try to run the query
Msg 206, Level 16, State 2, Line 1
Operand type clash: uniqueidentifier is incompatible with int
*****READ THIS AS WELL***** I truly believe my issues is that the NCM_PolicyCacheResults.NodeID does NOT match or has nothing to do with the Nodes.NodeID, I have tried to use the CAST to convert the NCM_PolicyCacheResults.NodeID to a varchar with no luck, as the NCM_PolicyCacheResults.NodeID is a GUID and does not match up to the simple Nodes.NodeID structure of what appears to me just decimals increasing by 1********
SELECT
[Nodes].Modal, [Nodes].SysName, [Nodes].MachineType, [NCM_PolicyCacheResults].PolicyName, [NCM_PolicyCacheResults].RuleName, 'Errorlevel' = CASE [NCM_PolicyCacheResults].ErrorLevel
WHEN '0' THEN 'Info'
WHEN '1' THEN 'Warning'
WHEN '2' THEN 'Critical'
ELSE 'Not-Defined'
END
FROM Nodes
JOIN NCM_PolicyCacheResults ON
[Nodes].NodeID = [NCM_PolicyCacheResults].NodeID
WHERE [NCM_PolicyCacheResults].ReportName LIKE 'MDOT Cisco QoS Policy Report (3750)%'
AND [NCM_PolicyCacheResults].IsViolation = 'True'
AND [Nodes].SysName != ''
AND ([Nodes].SysName NOT LIKE '%INET%' AND [Nodes].SysName NOT LIKE '%NMD%' AND [Nodes].SysName NOT LIKE '%DMZ%' AND [Nodes].SysName NOT LIKE '%EXNET%' AND [Nodes].SysName NOT LIKE '%FABRIC%' AND [Nodes].SysName NOT LIKE '%SERVCNET%' AND [Nodes].SysName NOT LIKE '%SERVICENET%' )
ORDER BY [Nodes].Modal, [NCM_PolicyCacheResults].RuleName, [Nodes].SysName