-->
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.  [ 4 posts ] 
Author Message
 Post subject: Is Rank() over partition supported in hql query?
PostPosted: Wed Apr 10, 2013 4:30 am 
Newbie

Joined: Wed Apr 10, 2013 4:25 am
Posts: 4
Is Rank() over partition supported in hql query?. If not what is the equivalant function in HQL? I am not able to get valid answers from google results.


Top
 Profile  
 
 Post subject: Re: Is Rank() over partition supported in hql query?
PostPosted: Thu Apr 11, 2013 9:30 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
I fear not.
Rank over partition seems to be a special feature of SQLServer not common to other databases,
that's maybe the reason why it did not make into HQL.


Top
 Profile  
 
 Post subject: Re: Is Rank() over partition supported in hql query?
PostPosted: Mon Apr 15, 2013 6:44 am 
Newbie

Joined: Wed Apr 10, 2013 4:25 am
Posts: 4
Thanks for the clarification.In hibernate createSqlquery RANK() over partition is working fine, but i want to use it in HQL. Is there any alternate?


Top
 Profile  
 
 Post subject: Re: Is Rank() over partition supported in hql query?
PostPosted: Thu Apr 18, 2013 3:20 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
I think using createSqlQuery is the best way.
The purpose using HQL instead to native SqlQuery is getting database independence.
I you rely on using RANK() over partition then you are tied to SQLServer anyway.


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

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.