Hi am totally new to Hibernate, and have an SQL statement that I need to convert into HQL hope someone can please help?
SQL Statement
Quote:
SELECT max(SenseValue)-min(SenseValue)
FROM IODeviceData
WHERE NetworkID= 80
AND IODeviceID=129
AND SenseDate >= '2010-01-01' /**etc.**/
AND SenseDate <= getDate()
And have got so far in HQL without errors... (am using Netbeans6.8 to run HQL statements)
Quote:
from IodeviceData
WHERE NetworkID=80
AND IODeviceID=129
AND SenseDate >= '2010-01-01'
AND SenseDate <= GETDATE()
However am unable to use the SELECT to project just the needed values as in when i add following keep getting errors:
Quote:
SELECT max(SenseValue)-min(SenseValue)
Hope someone can help me to find the max-min value?? thanks