For full details see: https://social.technet.microsoft.com/Forums/en-US/configmgrreporting/thread/8bda0fe9-7d80-44d0-9a52-f1f573423abf/
selectCS.ResourceID,cs.NAME0,PC2.name0,substring(CS.NAME0,5,LEN(cs.NAME0))fromdbo.v_GS_COMPUTER_SYSTEM CS,(select CS.ResourceID, cs.NAME0, substring(CS.NAME0,5,LEN(cs.NAME0)) as 'TAG' from dbo.v_GS_COMPUTER_SYSTEM cS) as PC2
Wheresubstring(CS.NAME0,5,LEN(cs.NAME0)) = PC2.Tagand PC2.Tag != ''and PC2.ResourceID != CS.ResourceID
Recent Comments