SQL Query - Ignore null values unless statement -


i need sql query. querying active directory , need ignore objects have manager field set null unless object has name. not quite sure how perform unless statement need. here have far:

select     distinguishedname uniqueid,            department,            title,             manager managerid,            displayname name,             mail email,            thumbnailphoto photo  openquery(adsi,'select mail,                              cn,                              distinguishedname,                              manager,                               displayname,                               title,                              department,                              thumbnailphoto                                               ''ldap://internal.mesacounty.us'                                   'where objectcategory=''person'' ,                                       objectclass = ''user''') derivedtbl_1          (manager not null ***unless displayname = ''whatever name choose'') 

replacing unless or should it.


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -