[mssms] RE: Query for Systems Not in a Certain OU

2014-10-15 Thread Murray, Mike
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: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Gushue, William Sent: Wednesday, October

[mssms] RE: Query for Systems Not in a Certain OU

2014-10-15 Thread Bruce Hethcote
Use a subselect query that basically returns all systems that are “not in” the query that works. Bruce Hethcote | Technical Training Team From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Gushue, William Sent: Wednesday, October 15, 2014 2:57 PM To:

[mssms] Re: Query for Systems Not in a Certain OU

2014-10-15 Thread William Jackson
select * from SMS_R_System where SMS_R_System.ResourceID not in (select ResourceID from SMS_R_System where SMS_R_System.SystemOUName = OUName)​ William From: listsad...@lists.myitforum.com listsad...@lists.myitforum.com on behalf of Gushue, William bgus...@osler.com Sent: Wednesday, October

[mssms] RE: Query for Systems Not in a Certain OU

2014-10-15 Thread Schwan, Phil
Sure it’s possible, you just need to use a nested query. Something like Select * from SMS_R_System where ResourceID not in (select ResourceID from SMS_R_System Where SystemOUName = ‘OUName’ ) -Phil _ Phil Schwan | Technical

[mssms] RE: Query for Systems Not in a Certain OU

2014-10-15 Thread Daniel Ratliff
3:09 PM To: myITforum SMS List (mssms@lists.myitforum.com) Subject: [mssms] Re: Query for Systems Not in a Certain OU select * from SMS_R_System where SMS_R_System.ResourceID not in (select ResourceID from SMS_R_System where SMS_R_System.SystemOUName = OUName)​ William From: listsad

[mssms] RE: Query for Systems Not in a Certain OU

2014-10-15 Thread Garth Jones
You will need a subselect query. These blog post will help you. http://be.enhansoft.com/post/2014/09/17/The-Subselect-Query.aspx http://be.enhansoft.com/post/2014/09/24/Subselect-Query-for-SCCM-Queries-or-Collections-(WQL).aspx From: listsad...@lists.myitforum.com

[mssms] RE: Query for Systems Not in a Certain OU

2014-10-15 Thread Gushue, William
that responded and I’ll keep Garth’s links for reference. From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Garth Jones Sent: Wednesday, October 15, 2014 3:15 PM To: mssms@lists.myitforum.com Subject: [mssms] RE: Query for Systems Not in a Certain OU You

[mssms] RE: Query for Systems Not in a Certain OU

2014-10-15 Thread Gushue, William
: 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: listsad...@lists.myitforum.commailto:listsad...@lists.myitforum.com [mailto:listsad

[mssms] RE: Query for Systems Not in a Certain OU

2014-10-15 Thread Carlson, Robert C
: [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: listsad...@lists.myitforum.commailto:listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Murray, Mike Sent