We are using Oracle 11. Both below queries return 01-JAN-00
SELECT to_date('01-JAN-1900','dd-MM-yyyy') FROM DUAL
SELECT to_date('01-JAN-1900','dd-MM-RRRR') FROM DUAL
How can I do a query that return ’01-JAN-1900’ ?
I need to do the below query (myDtColumn is a Date column), if I just use '01-JAN-1900' without the to_date, I will get an error 'inconsistent data types: expected %s got %s'
case when myDtColumn is null then to_date('01-JAN-1900','dd-MM-yyyy') else
myDtColumn end as myDt
When I try the below, I am still getting '01-JAN-00' instead of '01-JAN-1900'
case when myDtColumn is null then DATE '1900-01-01' else
myDtColumn end as myDt