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 - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -