INTERVAL DAY TO SECOND comparison in SELECT.
Marius2Oct 27 2006 — edited Oct 27 2006I would like to to a comparison like this in the select statement:
If interval_a > interval b THEN return_a ELSE return_b.
My only idea was:
SELECT CASE SIGN(interval_a-interval_b) WHEN 1 THEN return_a ELSE return_b END
*
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected NUMBER got INTERVAL DAY TO SECOND
Any easy solution to this?