db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Dunne <imir...@alldunne.com>
Subject sort by one column minus another column
Date Fri, 31 Mar 2006 16:13:55 GMT
Evening all,

I have a table with two columns; one that stores the start time of a
session and another with the stoptime of a session, cryptically named,
STARTTIME and STOPTIME.

Sorting by one or the other is easliy done by addDescendingOrderByColumn
(or, of course, addAscendingOrderByColumn). But how can I sort by the
difference between these two columns (i.e. the session duration)? This
can be done in sql by simply stating ORDER BY STOPTIME - STARTTIME, but
can I do this using the criteria object?

Thanks in advance,
John.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message