Hi,
I want to have a query like this:
select trunc(sysdate - mydatecolumn) days
from table
order by days
I have something like this:
query.addAttribute("days", ExpressionMath.subtract(expBuilder.currentDate(), expBuilder.get("mydatecolumn"));
query.addOrdering(?);
How to add the trunc and how to add the ordering without specifying the expression again?
I am using Toplink 10.1.3 on a 10.2 Oracle database.