Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

PENDING Collection with all devices with build number 1766 and 1706

AhmedLS

Well-Known Member
Messages
181
Solutions
17
Reaction score
17
Points
18
Hi,
i have this query that list all devices with build number 1766 and have a similar that list devices with build 1706 (each on it is own collection). couldnt find a way to make one query for both builds in one collection. greatful for any help

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.BuildExt like "10.0.19044.1766" and SMS_R_System.OperatingSystemNameandVersion like "%Workstation%"
 
Solution
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.BuildExt like "%.1706" or SMS_R_System.BuildExt like "%.1766"

Alternatively, you could create a new collection and just create Include rules for your two separate collections to combine them.
Six of one, half a dozen of the other...
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.BuildExt like "%.1706" or SMS_R_System.BuildExt like "%.1766"

Alternatively, you could create a new collection and just create Include rules for your two separate collections to combine them.
Six of one, half a dozen of the other...
 
Solution
thanx for both of you. your solutions worked ofcourse but i was looking for some variable to be used instead of using OR. wondering if there is something like the * when searching as an example 17* or any symbol that can represent numbers.
 
thanx for both of you. your solutions worked ofcourse but i was looking for some variable to be used instead of using OR. wondering if there is something like the * when searching as an example 17* or any symbol that can represent numbers.
Yes the character is a percent sign aka 17%
 
any idea why this query
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.BuildExt like "%.17%"

brings less computers (by 20 actually) than 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.BuildExt like "%.1706" or SMS_R_System.BuildExt like "%.1766"
 
any idea why this query
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.BuildExt like "%.17%"

brings less computers (by 20 actually) than 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.BuildExt like "%.1706" or SMS_R_System.BuildExt like "%.1766"
You will need to look at one of the computers not in the list and determine why that is.
 
Is there any particular reason for not wanting to use an 'or' statement? Seems like it works you end up with the results you desire.
- BH
 
Is there any particular reason for not wanting to use an 'or' statement? Seems like it works you end up with the results you desire.
- BH
there is no reason but just for knowledge i dropped the question. wanted to know the * equivalent in a query. i tried the % actually before i drop the question but it didnt work out for some reason but all is good now. thanx
 

Forum statistics

Threads
7,133
Messages
27,858
Members
18,151
Latest member
TonyGTR
Back
Top