Trying to compare dates in select statement to yield boolean result
707657Jun 18 2009 — edited Jun 18 2009I'm trying to convert from MySQL to Oracle.
I have existing queries in this form:
select date_add(entered,interval 7 day) < now() as check
from user
where id = 1";
I've converted this to:
select (7+entered) < TO_DATE('2009-06-18','RRRR-MM-DD') as check
from user
where id = 1
When I run this, I get this error:
ORA-00923: FROM keyword not found where expected
If I add parens around the select,
select ( (7+entered) < TO_DATE('2009-06-18','RRRR-MM-DD') ) as check
from user
where id = 1
I get ORA-00907: Missing right parenthesis.
Thanks in advance for any assistance.
Regards,
Marty