I am trying to run a query from sql developer and query has variables (:var). I am having problem with the date variables.
I used all the possible combinations to format date using to_date() function.
Every time getting below exception:
ORA-00932: inconsistent datatypes: expected DATE got NUMBER 00932. 00000 - "inconsistent datatypes: expected %s got %s" *Cause: *Action:
Sorry can’t post image here
Advertisement
Answer
Try changing your query to be:
select first_name,
last_name,
dob,
org
from emp
where dob > to_date(:highDate,'DD-MON-YYYY');
then when prompted, enter '20-JAN-2010'.