-->
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: sorting with null value
PostPosted: Thu Jan 19, 2006 2:53 pm 
Newbie

Joined: Thu Jan 19, 2006 2:36 pm
Posts: 3
I appreciate if you can help me with this problem...
I have 2 tables: people and address, they are linked via a foreign key, say user_id, for a given user, it could have multiple addresses (rows) returned, so I'd like to sort the address search result in descending order based on the column "last_update_timestamp" in the Address table if all the rows are populated with values; If one or more addresses(rows) are null, then I want to put them at the bottom of the sorted result, Can somebody show me how to do this in HQL?
I know in SQL I could use something similar to:
ORDER BY last_update_timestamp IS NULL ASC, last_update_timestamp DESC....
Thanks.


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.