-->
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: Subquery inside CASE statement in select clause
PostPosted: Thu Oct 15, 2009 4:56 am 
Newbie

Joined: Thu Oct 15, 2009 4:48 am
Posts: 1
Location: Pune, India
Hi All

I am trying to use a subquery inside case clause of HQL. This subquery is actually returning some data.. but I do see that this is not functioning as expected.. although when firing a subquery for count stuff it works perfectly fine in the same place.

Code:
select item1, item2 ,
case when (countquery>0)   then item4, item 5
       else (subquery) as alias1
from TableName


Does Hibernate Support this..? Any help would be highly appreciable.

Thanks
Gaurav D

_________________
-------------
Gaurav Daga
http://gauravwrites.blogspot.com


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.