Apply IsNull function on a date column (SQL Server) -


i trying apply isnull function column of datatype date. trying is, replace word null empty string (actual null value) when retrieving data

the code using is;

select      isnull("update_dt", '')      mytable 

i have tried

select      isnull("update_dt", 0)      mytable 

the error getting

msg 103010, level 16, state 1, line 1
parse error @ line: 4, column: 1: incorrect syntax near 'from'.

if want see column empty string rather "null", need convert output string. control format, use convert():

select coalesce(convert(varchar(10), update_dt, 121), '') . . . 

then use coalesce() (or if must, isnull()) replace null value string.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -