Problem with table query

Last Post 08 Sep 2004 01:25 PM by jkgsung. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
jkgsung
New Member
New Member

--
08 Sep 2004 01:25 PM
When I use the following, I get the below message. Any thoughts?

SELECT * INTO tableADGroups
FROM OPENQUERY(ADSI,
'SELECT name
FROM ''LDAP://10.10.10.1/OU=MyDepartment,OU=MyCompany,DC=int,DC=sun,DC=corp;
WHERE objectCategory = ''group'' AND objectClass = ''group''')
GO
SELECT * FROM tableADGroups




Server: Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing a query for execution against OLE DB provider 'ADsDSOObject'.

This one works fine:

CREATE VIEW viewADGroups
AS
SELECT *
FROM OPENQUERY( ADSI,
'SELECT name
FROM ''LDAP://10.10.10.1/OU=MyDepartment,OU=MyCompany,DC=int,DC=sun,DC=corp''
WHERE objectCategory = ''group'' AND objectClass = ''group''')
GO
SELECT * FROM viewTestADGroups

My ultimate goal is to extract either the member or memberOf attribute. It looks like since both of those attributes are multi-valued that I'd have to extract them into a child-table. Not sure how to do that yet, but first I need to be able to extract the main table.
You are not authorized to post a reply.

Acceptable Use Policy