vermap vermap - 1 year ago 105
SQL Question

How to use date variable in sql developer's "Enter Binds" dialog?

I am trying to run a query from sql developer and query has variables (

). I am having problem with the date variables.

I used all the possible combinations to format date using
Every time getting below exception:

ORA-00932: inconsistent datatypes: expected DATE got NUMBER
00932. 00000 - "inconsistent datatypes: expected %s got %s"

Sorry can't post image here

Answer Source

Try changing your query to be:

select first_name,
  from emp
 where dob > to_date(:highDate,'DD-MON-YYYY');

then when prompted, enter '20-JAN-2010'.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download