-->
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.  [ 3 posts ] 
Author Message
 Post subject: Why this HQL statement gives me an error?
PostPosted: Fri Apr 23, 2004 4:50 pm 
Newbie

Joined: Thu Apr 01, 2004 6:28 pm
Posts: 15
String sql = "select count(orders.productid) from Orders as orders where orders.ordernumber in(select orders.ordernumber from orders where orders.productid=:productid );

'parse error near where' yet I dont see how I'm wrong


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 23, 2004 6:30 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Looks like no class alias in the HQL sub-select.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 23, 2004 6:59 pm 
Newbie

Joined: Thu Apr 01, 2004 6:28 pm
Posts: 15
Yeah, I realized some minutes ago.
Another problem, how do I order by 'count()',
I tried to make like postgres 'order by count', but
he doest accept this, the manual doest mention this
any clue?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.