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
Post a Comment