jnelson993
Posts: 959
Score: 132 Joined: 2/18/2005 From: Minneapolis, MN Status: offline
|
What you're looking for by writing it the way you are is, "show me all of the machines that have any software except that one hotfix" Well, that will match every machine you have. Instead you need to first write a subquery to find all of the resourceIDs for machines that HAVE that hotfix, then find all of the machines that aren't in that list. 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.ResourceID IN (SELECT ResourceID FROM SMS_G_System_ADD_REMOVE_PROGRAMS WHERE SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName != "Hotfix for Windows XP (KB937468) (For testing purposes only)")
_____________________________
Number2 (John Nelson) MyITForum - Blog MyITForum - Forum Posts
|