| |
dug04
Posts: 2
Score: 0
Joined: 11/8/2006
Status: offline
|
Hi I am trying to write a query that will select all users in the Organization bucket in active directory. The problem is that within the Organization bucket, there are many other buckets. I want to filter/exclude one bucket. Example: +Organization ++Store1 +++User1 +++User2 ++Store2 +++Users... ++Store3 +++Users... I want to select all the Stores, except for Store3 Here is the query I have so far: The query selects all active users in Organization SELECT * FROM OPENQUERY(ADSI, '<LDAP://OU=Organization,DC=sara-tx,DC=org>;(&(objectCategory=Person)(objectClass=User)(!userAccountControl:1.2.840.113556.1.4.803:=2));cn,givenName,sn,userAccountControl,telephoneNumber,mail,department,title,physicalDeliveryOfficeName,company;subtree') order by sn Please help
|
|