Use a subselect query that basically returns all systems that are “not in” the query that works.
Bruce Hethcote | Technical Training Team From: [email protected] [mailto:[email protected]] On Behalf Of Gushue, William Sent: Wednesday, October 15, 2014 2:57 PM To: myITforum SMS List ([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. ******************************************************************** ________________________________ Legal Notice: This email is intended only for the person(s) to whom it is addressed. If you are not an intended recipient and have received this message in error, please notify the sender immediately by replying to this email or calling +44(0) 2083269015 (UK) or +1 866 592 4214 (USA). This email and any attachments may be privileged and/or confidential. The unauthorized use, disclosure, copying or printing of any information it contains is strictly prohibited. The opinions expressed in this email are those of the author and do not necessarily represent the views of 1E Ltd. Nothing in this email will operate to bind 1E to any order or other contract.

