-->
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: Subselect HQL
PostPosted: Sun Nov 05, 2006 5:19 am 
Newbie

Joined: Fri May 05, 2006 4:54 am
Posts: 14
Hello!

This query works in mysql:

select * from table1 w1 where user_id= 3 and column1 = (select Max(column1) from table1 w2 where w1.column2 = w2.column2 and user_id= 3) group by column2

As you can see, I need the Max column1 and the row that has the max column1.

How can I get it to work in HQL.

i use Hibernate 3.0


Regards

Toni


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.