Hi all!
I'm desperately trying to execute a query which has in its WHERE condition a Date field.
Since the Date field contains dd/mm/yyyy hh:mm:ss I need to issue a trunc:
this is the exact SQL that works from Sql plus:
Code:
select taskId FROM tasklist
where trunc(begin_date) = to_date( '01-01-2004','dd-mm-yyyy')
This is my EJB QL query:
Code:
SELECT taskId from TaskList WHERE trunc(BEGIN_DATE)= '2004-01-01'
but this issues a "Caused by: java.sql.SQLException: ORA-01861: literal does not match format string"
Code:
SELECT taskId from TaskList WHERE trunc(BEGIN_DATE)= '01/01/2004'
Still the same problem.....:-(
I'm using Entity Beans 3.0 JPA (JBoss Application server). Unfortunately I couldn't find anything on EJB 3.0 related documents so I'm looking here for help.....
thanks alot
frank