-->
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: intersect not working
PostPosted: Fri Nov 30, 2007 3:28 am 
Newbie

Joined: Thu Nov 01, 2007 6:34 am
Posts: 2
Hi, I have a query which has an intersect clause, query is something like this

String query = "select p.objID, p.UName, p.UValue from UImpl p where p.UName in ('UStatus','UType','UPriority','RName') and p.objID in ((select p.objID from UImpl p where p.UName='UPriority' and p.UValue='1') intersect (select p.objID from UImpl p where p.UName='RName' and p.UValue='1')";

getHibernateTemplate().find(query);


The query works fine when executed in DB2 control center Command editor, but when the above statement is executed, it gives an exception saying
unexpected token 'intersect'

Is intersect allowed in hibernate? if not what is the alternative?


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.