Nevermind...
I got it working .. Thanks Vinaya ________________________________ From: Vinaya Tirikkovalluru Sent: Tuesday, February 12, 2008 4:11 PM To: 'user-java@ibatis.apache.org' Subject: Subquery with where clause Hi, I have this situation where I need to write a sub query. The query would be similar to : SELECT * FROM table1 a AND EXISTS ( SELECT 1 FROM Table2 b WHERE b.col1 = a.col1 AND b.col2 = a.col2 AND b.col3 = ? ) This should be a dynamic query where the first query can have where condition out of the Example class generated by Abator Thanks Vinaya This electronic message is intended only for the use of the individual(s) or entity(ies) named above and may contain information which is privileged and/or confidential. If you are not the intended recipient, be aware that any disclosure, copying, distribution, dissemination or use of the contents of this message is prohibited. If you received this message in error, please notify the sender immediately.