Posts Tagged ‘Collections’

This came up at work again, so I’ve decided that so I can find it this time, I’ll post it here. This is directly from SMS Guys¬†who have moved on to here.

1. Create a collection that will contain all clients to be excluded from another collection (we’ll call it ‘ExclusionsCollection’ for this example.)

2. Once you have that, go into the Collections table in the SMS SQL database and find the row that contains ‘ExclusionsCollection’. Note the corresponding ‘ResultTableName’. EDIT: A simpler way is to look in the Collection’s properties – the ID is at the bottom.

3. In the collection that you want to exclude the members of ‘ExclusionsList’ from, copy and paste the following query:

select SMS_R_System.ResourceID,SMS_R_System.ResourceType,
from SMS_R_System where Client = 1 and ClientType = 1 and
ResourceId not in (select ResourceID from SMS_CM_RES_COLL_XXXxxxxx)

Read Full Post »