I wrote a query of the form:
select .... where x.y in (?) union select .... where p.y in (?) and a.b not in (?)
The question marks indicate places where I put multiple values at run time (dynamically putting values in the IN clause) using the preparedStatement.setString() method.
The resultset, on executing this query seems to ignore the query after the union clause. I get no exception anywhere.
I post this question, just to know if anyone else has faced such a problem, like this link suggests UNION of multiple tables and preparedstatement not working The database is Oracle 10g, in case that makes a difference.