db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <Richard.Hille...@Sun.COM>
Subject Re: JDBC and WHERE IN clauses
Date Fri, 23 Sep 2005 22:45:39 GMT
Hi Tony,

You could try using a temporary table to hold your parameter values. By 
changing the contents of the temporary table you might achieve what you 
want. Something like the following:

declare global temporary table session.ztemp
( param int )
not logged;


select *
from names
where id in ( select param from session.ztemp );

Cheers,
-Rick

Tony Seebregts wrote:

> Hi,
>
> Does anybody know of a way to use a PreparedStatement with a WHERE IN 
> (?) clause
>
> e.g. SELECT * FROM Names WHERE ID IN (?)
>
> where the parameter is replaced by an array of e.g. int's ?
>
> regards
>
> Tony Seebregts
>
>
>


Mime
View raw message