vendredi 2 octobre 2015

TSQL Null data to '' replace

I have the following query:

SELECT pics.e_firedate FROM et_pics

Result:

NULL
2014-12-01 00:00:00.000
2015-04-03 00:00:00.000
NULL
NULL

I want to replace NULL values to ''.

CASE 
        WHEN pics.e_firedate IS NULL THEN ''
        ELSE pics.e_firedate
END

makes NULL transforming to 1900-01-01 00:00:00.000, which I've tried to cast and replace with no success also.

How can I achive my goal?

Aucun commentaire:

Enregistrer un commentaire