Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NO CDROM Query

Status
Not open for further replies.

veil

MIS
Joined
May 7, 2001
Messages
1
Location
CA
Does any one have a query thats shows machines that *do not* have a CDROM installed?

tia
 
Something such as this should work for you:

select SMS_R_System.Name, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.NetbiosName from SMS_R_System left join SMS_G_System_CDROM on SMS_G_System_CDROM.ResourceID = SMS_R_System.ResourceId where SMS_R_System.Client = 1 and SMS_G_System_CDROM.ResourceID is NULL

What makes this query select what you want are the criteria SMS_G_System_CDROM.ResourceID is NULL and the left join from SMS_R_System left join SMS_G_System_CDROM on SMS_G_System_CDROM.ResourceID = SMS_R_System.ResourceId .

You can paste the query in directly after pressing Show Query Language button during query creation/editing. Of course, you can add and remove fields as necessary.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top