sql server - SQL test empty string -
i have query. want to
records in date range -> done records priorsurgery = 'yes' -> done records consultant not blank - not working
how test no blank.
ive tried and adm.adm_consultant != ''
ive rried and adm.adm_consultant <> ''
and 1 below (which looks better way it)
where going wrong?
select adm.adm_consultant, adm.adm_priorsurgery admission adm adm.adm_referraldate >= '01/01/2014 00:00:00' , adm.adm_referraldate <= '31/12/2014 00:00:00' , adm.adm_priorsurgery = 'yes', , length(adm.adm_consultant) > 0
if values null then
select adm.adm_consultant, adm.adm_priorsurgery admission adm adm.adm_referraldate >= '01/01/2014 00:00:00' , adm.adm_referraldate <= '31/12/2014 00:00:00' , adm.adm_priorsurgery = 'yes' , adm.adm_consultant not null
Comments
Post a Comment