Collection to list all duplicate system names
Does anyone have a simple query to use in a collection to list all systems that have the same Name?
I found one solution that consists of 3 queries, but it doesn't work. doesn't show the 2 systems that I have with the same name (different GUIDs).
SCCM 2007 SP2 R3.
Something simple...
thanks
September 14th, 2011 1:36pm
Have you tried
Select R.ResourceID,R.ResourceType,R.Name,R.SMSUniqueIdentifier,R.ResourceDomainORWorkgroup,R.Client from SMS_R_System as r full join SMS_R_System as s1 on s1.ResourceId = r.ResourceId full join SMS_R_System as s2 on s2.Name
= s1.Name where s1.Name = s2.Name and s1.ResourceId != s2.ResourceIdAnoop C Nair - Twitter @anoopmannur
MY BLOG:
http://anoopmannur.wordpress.com
SCCM Professionals
This posting is provided AS-IS with no warranties/guarantees and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
September 14th, 2011 1:42pm
Hi,
Use this :
select * from sms_g_system_SYSTEM as g INNER JOIN sms_gh_system_SYSTEM as h on g.ResourceId = h.ResourceId where g.Name <> h.Name
Bechir Gharbi | http://myitforum.com/cs2/blogs/bgharbi/ | Time zone : GMT+1
September 14th, 2011 1:42pm
Bechir,
I may be doing something wrong, but I get the error "the query statement that you entered is not valid...". The query from An00p's reply works...
thanks
Free Windows Admin Tool Kit Click here and download it now
September 14th, 2011 1:45pm