Monday 15 April 2013

sql - converting a column to be empty -



sql - converting a column to be empty -

i have 2 tables in 1 table has datecolumn , other not have, have main union fetch entries both table

so of successful, empty fields showing invalid date 1900-01-01, want should dispayed null, cast varchar

i trying

select [orderid],cast('' [cancelleddate] char(20)) [cancelleddate] ,'' [cancelledtime]

the above throwing error

and doing way effect performance

select orderid, cancelleddate, cancelledtime table1 union select orderid, null, null table2

sql

No comments:

Post a Comment