sql server 2008 - Remove the Null Value from the result generated from MAX() used in query sql -


when use query:

select max(dt_logdate)   ums_logentry_dtl  c_inputmode='r' , vc_deviceid=10 

the table gives maximum date, if condition not satisfied returns data table null. there null row. need empty data table. how remove null on noresult?

you use having clause:

select max(dt_logdate)   ums_logentry_dtl  c_inputmode='r' , vc_deviceid=10 having max(dt_logdate) not null 

Comments