-->
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: Help with Sub-Query.....
PostPosted: Sat Sep 29, 2007 9:18 pm 
Newbie

Joined: Sat Sep 29, 2007 9:13 pm
Posts: 1
Hi,
I have problem using the following EJB3 query with two sub-query in place.


SELECT t FROM FacilityStatus model, IN(model.facility) t
WHERE t.facilityId IN (SELECT b.facilityId FROM (SELECT t2.facilityId, MAX(model.id.statusAsgnDate
FROM FacilityStatus model1, IN(model1.facility) t2
WHERE model1.statusCodes.statusCode IN (300, 301)
GROUP BY t2.facilityId) b)

When I run the regular SQL on Oracle, it is fine and acceptable.

Can someone please help? Thank you.


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.