Here is the code is used to retrive from the db with using the IN operator but i am getting no of the record but the same query works in the oracle if I ran this below query...
Connection con = ts.getConnection();
PreparedStatement ps = con.prepareStatement("Select column_name from table_name where Column_Name in( ? ) ");
ResultSet rs = ps.executeQuery();
I have tried with several posiblities with the Preparedst with binding the valus ...
but the same query works if i give
("Select column_name from table_name where Column_Name in( "'DATA1','DATA2'") ");
can any one tell me why the above code is not working
Thanks for ur reply in advance.........
Prepared Statement puts quotes for any setString .
So when you say
the value set is
this means ques\ry searches for the whole string
hence no record found .
hope this helps...
Thanks for ur reply ,Let me check out...