Select * from SMS_R_System Where SMS_R_System.SystemOUName = "<OUName>" And SMS_R_System.SystemOUName != "OHHLLP.COM/IS/COMPUTERS"
Rob Carlson | Senior SMS - Patch Management Engineer Vanguard 2.2.1 Contract | SAIC Team | Strategic Business Systems Supporting IRM/OPS/ENM/PSD/SLM Desk phone: (703) 372-4852 | Mobile phone: (703) 597-3680 Annex/Location: TOATS 204 | email: [email protected]<mailto:[email protected]> Please consider the environment before printing this email. Can't find a patch? Try searching (CTRL-F) ftp://patchopnftp.washdc.state.sbu/PatchListing.pdf. CLASSIFICATION: UNCLASSIFIED This e-mail is unclassified based on the definitions of E.O. 12958 This email is UNCLASSIFIED. From: [email protected] [mailto:[email protected]] On Behalf Of Gushue, William Sent: Wednesday, October 15, 2014 4:26 PM To: [email protected] Subject: [mssms] RE: Query for Systems Not in a Certain OU That is what I am trying to do and I'll keep this for future reference. Good idea. Thanks, Mike. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Murray, Mike Sent: Wednesday, October 15, 2014 3:08 PM To: [email protected]<mailto:[email protected]> Subject: [mssms] RE: Query for Systems Not in a Certain OU If you're trying to build a collection, here's a lazy way out - create a collection of computers in that OU, then exclude that collection in in the new collection. From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Gushue, William Sent: Wednesday, October 15, 2014 11:57 AM To: myITforum SMS List ([email protected]<mailto:[email protected]>) Subject: [mssms] Query for Systems Not in a Certain OU I am trying to write a query which returns all systems that are not in a certain OU, but those systems still get returned. This query works and returns the 32 items it should: select * from SMS_R_System where SMS_R_System.SystemOUName = "<OUName>" This query returns 1963 items, but includes the 32 that I don't want: select * from SMS_R_System where SMS_R_System.SystemOUName != "OHHLLP.COM/IS/COMPUTERS" Is this query even possible? Thanks. ________________________________ ******************************************************************** This e-mail message is privileged, confidential and subject to copyright. Any unauthorized use or disclosure is prohibited. Le contenu du présent courriel est privilégié, confidentiel et soumis à des droits d'auteur. Il est interdit de l'utiliser ou de le divulguer sans autorisation. ********************************************************************

