What is the best way to convert empty value of DATE datatype to string "empty date".
I do at the moment so:
with t
as
(
select current_date d from dual
union
select null from dual)
select t.d, nvl(to_char(t.d),'empty date') a/*, nvl(t.d,'empty date') b*/ from t;
--
03.03.2010 03.03.2010
(null) empty date
If i tried to display commented column b there, but i got error:
"ORA-01858: a non-numeric character was found where a numeric was expected"
So, is the best way to display for null dates other string like "empty date" the way i do in column "a"?
Or is there better way?