Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
[b]Hibernate version:[/b]
Hibernate Synchronizer
[b]Mapping documents:[/b]
hibernate-mapping-2.0.dtd
[b]Name and version of the database you are using:[/b]
DB2
dear all,
i need to calculate the date range between 2 date , my hql goes like this:
select '2005-07-18 00:00:00.0'-AL.DtDocumentDate
from tableA as AL where AL.SiRecordStatus = 1
and AL.DtDocumentDate <= '2005-07-18 00:00:00.0'
and AL.BiDebtor =11 and AL.ChClass='I'
and i got the error message like following :
net.sf.hibernate.QueryException: undefined alias: '2005-07-18 00:00:00 [select '2005-07-18 00:00:00.0'-AL.DtDocumentDate from com.ifca.mcorp.hh.ArdmxLedger as AL where AL.SiRecordStatus = 1 and AL.DtDocumentDate <= '2005-07-18 00:00:00.0' and AL.BiDebtor =11 and AL.ChClass='I']
- hibernate just didnt regconised the date . when i select date out from database , is in timestamp format , so i try to use timestamp for my given date .. but result is the same ...
hope can get any help from u all.
tans ! :)