Hi just found Hib and it sounds great, have created a new web project in Netbeans6.8 using Hib and have created a few mapping to same of our tables in the DB, currently im trying to get to gribs with Hib and how it differs from SQL and was wondering if someone could translate the following SQL statement from as stored pro into HQL, also is there a way to access the stored procedures from the mappings in Netbeans... many thanks...
Code:
SELECT (max(SenseValue)- min(SenseValue))/1000 as kWh
FROM IODeviceData
WHERE NetworkID=80
AND IODeviceID=129
AND SenseDate >='2010-01-02 00:00:00.000'
AND SenseDate <= getDate()