sysdate « Oracle « JPA Q&A





1. substract n minutes to sysdate (Oracle, HQL hibernate 2)    coderanch.com

Hi, Here is HQL I use for adding days: "select * from Person pers where (pers.birth> trunc(sysdate - :daysoffset))" - Persons with birth date after "daysoffset" days from now. but the birth field is full date with minutes and seconds. I want: Persons with birth date after "daysoffset" MINUTES from now. Thanks,

2. [Oracle 9i] [Hibernate 3.0] sysdate.    forum.hibernate.org

String hql = "select sysdate() from Category"; // "sysdate()" is correct, but "sysdate" not. Query q = session.createQuery(hql); List result = q.list(); ...

3. Problems with Oracle's SYSDATE and SYSTIMESTAMP    forum.hibernate.org

Hi I'm trying to get the sysdate or systimestamp from an Oracle database. If I use sysdate Hibernate is not retrieving the hour, minute, second part. I always get 12:00:00pm If I use systimestamp I get the following exception: org.hibernate.MappingException: No Dialect mapping for JDBC type: -101 at org.hibernate.dialect.TypeNames.get(TypeNames.java:56) at org.hibernate.dialect.TypeNames.get(TypeNames.java:81) at org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:192) at org.hibernate.loader.custom.CustomLoader.getHibernateType(CustomLoader.java:161) at org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(CustomLoader.java:131) at org.hibernate.loader.Loader.getResultSet(Loader.java:1678) at org.hibernate.loader.Loader.doQuery(Loader.java:662) ...