PENDING Collection with all devices with build number 1766 and 1706

AhmedLS

Well-Known Member
80
7
8
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...

bhethcote

Active Member
30
5
8
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...
 
  • Like
Reactions: AhmedLS
Solution
OP
AhmedLS

AhmedLS

Well-Known Member
80
7
8
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.
 

Garth

Well-Known Member
Staff member
1,592
132
63
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%
 
  • Like
Reactions: bhethcote
OP
AhmedLS

AhmedLS

Well-Known Member
80
7
8
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"
 

Garth

Well-Known Member
Staff member
1,592
132
63
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.
 
OP
AhmedLS

AhmedLS

Well-Known Member
80
7
8
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
 
  • Like
Reactions: bhethcote

Forum statistics

Threads
5,412
Messages
21,079
Members
11,569
Latest member
tomw128