My HQL needs to compare the date
select a.id.application_no , b.id.applicPcode
from dirHibernate.AccountApplic
ation as b
,dirHibernate.AccountDtl as p
where b.id.Flag = 'Y'
and b.id.applicationDate is not null
and b.id.applicationDate >= :FromDate Tue Aug 01 00:00:00 EST 2006
and b.id.applicationDate <= :ToDate Thu Aug 31 00:00:00 EST 2006
FromDate and ToDate are parameters
I check the blinding from the log file:
select a.id.application_no , b.id.applicPcode
from dirHibernate.AccountApplic
ation as b
,dirHibernate.AccountDtl as p
where b.id.Flag = 'Y'
and b.id.applicationDate is not null
and b.id.applicationDate >= Tue Aug 01 00:00:00 EST 2006
and b.id.applicationDate <= Thu Aug 31 00:00:00 EST 2006
I got the following errors..
org.hibernate.hql.ast.Quer
ySyntaxExc
eption: unexpected token:
Please advise.
Start Free Trial