Query that creates a collection with 2003 servers that have wts in their name
Hi I am working on a query that collects 2003 servers with WTS in their name. I have the following: select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.NetbiosName like "%wts%" and select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%Server 5.2%" and SMS_R_System.Client = 1 They work individually but I am not sure on how to combine them into one query. Hope someone can assist. Thanks :)
August 30th, 2011 6:17am

Try this select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.NetbiosName like "%wts%" and SMS_R_System.OperatingSystemandVersion like "%wts%"Kent Agerlund | My blogs: http://blog.coretech.dk/author/kea/ and http://scug.dk/ | Twitter @Agerlund | Linkedin: /kentagerlund
Free Windows Admin Tool Kit Click here and download it now
August 30th, 2011 6:26am

I am told that "The query statement that you entered is not valid. Please enter a valid query statement". I also changed %wts% to %5.2% for SMS_R_System.OperatingSystemandVersion like "%wts%
August 30th, 2011 6:32am

This should wrk select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion like "%Server 5.2%" and SMS_R_System.NetbiosName like "%WTS%"Anoop 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
August 30th, 2011 6:56am

Thanks. That worked great.
August 30th, 2011 7:01am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics