Hi,
First, some info about my environment:
Hibernate version: 2.1.4
Database: Oracle 9.2i
I'm using Oracle, so the following question is a bit oracle tinted, but should apply to other databases as well, only with some slight syntax differences.
1)
I'm trying to execute a statement in hql. The sql equivalent would be "SELECT sysdate FROM dual". I'm having a hard time figuring out how this would look like in hql.
The "sysdate" part of the query could be replaced by {fn NOW()}, giving:
Code:
select {fn NOW()} from dual
However, I'm not sure how to select stuff from a non-persister source like "dual" would be. The above of course does not work.
2) Also further, is it possible to use functions like oracle's "decode" in hql?
Thanks for any comments or suggestions,
Jen