-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate newbe needs some help - SQL to HQL
PostPosted: Wed Jan 27, 2010 9:27 pm 
Newbie

Joined: Wed Jan 27, 2010 9:20 pm
Posts: 2
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()


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.