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 |
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2012-12-05 : 03:02:35
|
Hi,I am using the below query to fetch records from LDAP server SELECT * FROM OpenQuery(ADSI, 'SELECT uid,MSUsername,DisplayName,mailFROM ''LDAP://aaa.xxx.com'' where objectClass = ''Person'' AND MSUsername = ''pmelody*'' ')Here i want to include the condition for another where clause for NULLSELECT * FROM OpenQuery(ADD, 'SELECT uid,MSUsername,DisplayName,mailFROM ''LDAP://aaa.xxx.com'' where objectClass = ''Person'' AND MAIL is null AND MSUsername = ''pmelody*'' ')Its giving up with an error pls help.Thanks,Gangadhara MSSQL Developer and DBA |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2012-12-05 : 03:40:32
|
Post the error message.--Chandu |
|
|
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2012-12-05 : 04:08:31
|
i got the solution but putting this condition mail="*" its worked for me.Thanks,Gangadhara MSSQL Developer and DBA |
|
|
mike.a
Starting Member
1 Post |
Posted - 2014-09-01 : 23:26:16
|
quote: Originally posted by gangadhara.ms i got the solution but putting this condition mail="*" its worked for me.
thank you man, it really works. but i had to use single quotes like mail='*'maybe implementation matters. it was W2K8 AD |
|
|
|
|
|