When I use the following query, I get the error below.
SELECT [Name], SN [Last Name], ST State,Title,street,l city,telephonenumber,adspath,
FROM OPENQUERY( ADSI,
'SELECT Name, SN, ST,title,SN,street, l,telephonenumber,adspath,
WHERE objectCategory = ''Person'' AND
objectClass = ''user''')
Server: Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing a query for execution against OLE DB provider 'ADSDSOObject'.
Also, the only user information that I want to extract at this time is the user's name and their user ID, which we have additionally stored in the description field.
Do I need to put the name space anywhere in the query?