I have a working query (Membership Rule) that gathers computers into a collection based on computer name.
I also have a working query that gathers by OS (in this example we will use Windows 7).
I have been trying to get the two combined into one query (basically an "and" statement instead of creating two separate membership rules, which apparently is an "or" statement).
I readily admit that building queries is not my strongpoint, and I don't even know if this is the proper way to go about it, but I have been tinkering with it quite a bit.
Here are the two queries...I know that both of them work individually, but I keep getting syntax errors when I try to combine them.
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 inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_R_System.OperatingSystemNameandVersion like "%Workstation 6.1%" or SMS_R_System.OperatingSystemNameandVersion like "%Windows 7%" and SMS_G_System_COMPUTER_SYSTEM.SystemType = "x64-based PC"
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 "Example"
Is there a way to combine these two statements into one? Any help would be very much appreciated!