How to use bind variables with IN clause in SQL statement

2007-04-18 Thread Sameer Deshpande
Hello, How do I use bind variables for the SQL statements having IN clause. F.ex SELECT id, name FROM t WHERE id in (10,20,30) As the IN list will have 'n' number of values, I am not able to specify fixed number of bind variables like SELECT id, name FROM t WHERE id in (?,?,?) As our

Re: How to use bind variables with IN clause in SQL statement

2007-04-18 Thread Rick Hillegas
Hi Sameer, You might try using a temporary table to hold the values in the IN list. For more details, see the section in the Derby Reference Manual titled DECLARE GLOBAL TEMPORARY TABLE statement. Here's an example of this technique. Regards, -Rick autocommit off; ij drop table t; 0 rows