Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
fralo
Posting Yak Master
161 Posts |
Posted - 2012-03-14 : 17:22:27
|
Hi all,I'm not sure if I'm posting this in the right spot. I'm trying to query from active directory.select name,email from test_tablewhere email in(SELECT mail FROM OpenQuery (ADSI, 'SELECT mailFROM ''LDAP://DC=####,DC=####,DC=###,DC=###''where objectClass = ''user'''))The error is:OLE DB provider "SQLNCLI10" for linked server "ADSI" returned message "Deferred prepare could not be completed.".Msg 8180, Level 16, State 1, Line 1Statement(s) could not be prepared.Msg 102, Level 15, State 1, Line 2Incorrect syntax near 'LDAP://DC=####,DC=###,DC=###,DC=###.Any help would be appreciated. |
|
|
|
|