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

Popular posts from this blog

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

Android Gson.fromJson error -