I have a view set up on data from the Active Directory set up as a linked server. (Win 2003 Server / MS SQL Server 2000). Here is the query used to set up the view:CREATE view ActiveDirectoryUsers asSELECT CAST(objectSID AS bigint) AS SID, sAMAccountName AS UserID,title, givenName AS FirstName, sn AS SurName, cn AS FullName,distinguishedName AS DN, telephoneNumber AS Phone, mobile,facsimileTelephoneNumber AS Fax, manager AS ManagerDN, department,mail AS EmailFROM OPENQUERY(ADSI,'SELECT objectSID, sAMAccountName, title, distinguishedName,telephoneNumber, mobile, facsimileTelephoneNumber, manager,department, givenName, mail, cn, adspath, snFROM ''LDAP://DC=example,DC=com''WHERE objectCategory=''Person''AND objectClass=''user''AND sn=''*''ORDER by sAMAccountName')Rowset_1
PROBLEMI need to set up a view of a particular Security Group (simply known as a 'group') within Active Directory, but nothing I've tried works. My attempts have revolved around adding an extra 'AND' to the 'WHERE' clause in the above query,EG:AND objectGroup=''Group'' AND name=''ExampleName''
The problem might be about somehow getting the name attribute to be related to the objectGroup attribute, but it could be anything else also.Any clues would be greatly appreciated.alphaz