-->
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: HQL: How to subtract clumn values from two consecutive rows
PostPosted: Tue Nov 14, 2006 2:26 pm 
Beginner
Beginner

Joined: Tue Aug 01, 2006 4:57 am
Posts: 25
Hi

I am new to Hibernate and HQL. Please help me, possibly with an example. In my application, I am using MySQL and I need to query the DB to find the time difference between two rows in a table.

The situation is something like this...
In row 1: there is a date (D1) column and I need to find the time difference by subtracting D1 from D2 (in row2). What will be Hibernate query for this? What do I need to do to repeat this for all rows of the table?

Please help me with this...


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.