-->
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: Simple query ???
PostPosted: Mon Jun 25, 2007 8:11 am 
Newbie

Joined: Mon Jun 25, 2007 7:50 am
Posts: 1
Hi,

I have problems with sql query.
I have 2 entities eg. Worker and Project and they have ManyToMany relationship. How do I get result from sql statement Select worker where he works in Project 1 AND Project 2?

I have used this query but it gives me wrong result:

" select * from Worker w join w.projects p where p.name=(select p.name from Project where p.name='Project1 or p.name='Project2' gropu by p.name) "


Best regards,
mb


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.