Example:
Your environment contains the following collections.
NursesRoom101
NursesRoom102
NursesRoom103
NursesRoom104
NursesRoom105
.. so on through..
NursesRoom200
To easily create a "All Nurse Rooms" master collection, the following query would grab them all:
selectSMS_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 ResourceID in (select ResourceID fromSMS_FullCollectionMembership JOIN SMS_Collection on SMS_FullCollectionMembership.CollectionID =SMS_Collection.CollectionID where SMS_Collection.name LIKE "NursesRoom%")
If you wanted to target multiple specific collections:
selectSMS_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 ResourceID in (select ResourceID fromSMS_FullCollectionMembership JOIN SMS_Collection on SMS_FullCollectionMembership.CollectionID =SMS_Collection.CollectionID where SMS_Collection.name LIKE "NursesRoom107" OR SMS_Collection.nameLIKE "NursesRoom109" OR SMS_Collection.name LIKE "NursesRoom122" OR SMS_Collection.nameLIKE "NursesRoom145" OR SMS_Collection.name LIKE "NursesRoom147" OR SMS_Collection.nameLIKE "NursesRoom149" OR SMS_Collection.name LIKE "NursesRoom150")
Replace these made up collections with your own.
Comments