Djackson Posted August 17, 2014 Report post Posted August 17, 2014 I have a question. I have 6 different AD security groups that I have created 6 queries on to tell me what users are a part of them. I want to do a query that references those 6 and will tell me what users have none of those groups. Is there a way to do that with how I have it setup or do I need to do a query that has all those groups listed in one query and do a subnet to tell me who is not a part of them? Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted August 17, 2014 Report post Posted August 17, 2014 A subselect query is what you want. http://smsug.ca/blogs/garth_jones/archive/2007/05/08/subset-query.aspx http://smsug.ca/blogs/garth_jones/archive/2007/05/09/sql-subset-query.aspx http://smsug.ca/blogs/garth_jones/archive/2007/05/10/wql-subset-query.aspx Quote Share this post Link to post Share on other sites More sharing options...
Djackson Posted August 17, 2014 Report post Posted August 17, 2014 Thanks for the reply. Would I be able to pick all 6 AD security groups and then get a result of what user does not belong to any of the 6? Quote Share this post Link to post Share on other sites More sharing options...
GarthMJ Posted August 17, 2014 Report post Posted August 17, 2014 Yes, you will need to create 6 subselect queries, one for each AD group. Quote Share this post Link to post Share on other sites More sharing options...