2005-02-07

Oracle Dates

Oracle seems to think that SYSDATE is some strange species of date.  If you try a statement like this:

select case when some_flag=1 then sysdate else some_date end from some_table;

Then Oracle will complain with 'ORA-00932: inconsistent datatypes'. The workaround is to use cast(sysdate as date).