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
Win a copy of
Android Security Essentials Live Lessons
this week in the
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
Hibernate (decode && null)
native SQL update in Hibernate
Sorting problem with HibernateSqlQuery with Websphere
Criteria API on fields without mapping
What to learn first for Java?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014