File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
How to add year in a given date using Hibernate Query
Joined: Mar 11, 2008
Apr 02, 2008 07:11:00
Actually the below mentioned Hibernate Query is not working
"select (bwSubMemberDE.registrationDateFrom + 60 YEARS) as REG from BwSubMemberDE as bwSubMemberDE"
Its throwing exception for Bad Sql grammar. And I have one restriction that I can not use native sql query.
[ April 05, 2008: Message edited by: Bear Bibeault ]
Joined: Mar 22, 2008
Apr 05, 2008 13:27:00
What exactly are you trying to achieve with your query? Without that explanation, we can't help you figure out the correct syntax.
There will always be people who are ahead of the curve, and people who are behind the curve. But knowledge moves the curve. --Bill James
Author and ninkuma
Joined: Jan 10, 2002
Apr 05, 2008 13:32:00
anandanand rairai, please
Asking smart questions
Books by Bear
I agree. Here's the link:
subject: How to add year in a given date using Hibernate Query
What to learn first for Java?
native SQL update in Hibernate
Hibernate (decode && null)
Criteria API on fields without mapping
Sorting problem with HibernateSqlQuery with Websphere
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015