davidwsica wrote:
I've got a query I need to execute on an Informix database. The SQL given to me to implement in my HQL contains the following clause:
Code:
OR (p.swdatecreated + 120 UNITS DAY) >= CURRENT
I get the following error for this query:
Code:
org.hibernate.hql.ast.QuerySyntaxError: unexpected token: DAY near line 51, column 90 [
Any ideas how I can implement this type of clause with HQL?
Is CURRENT some built in function for the current date?
Then you're lucky.
Code:
OR p.swdatecreated >= :current
and
Code:
Calendar c = new GregorianCalendar();
c.add(Calendar.DATE, -120);
q.setCalendar("current", c);
[/code]