JDBC and WHERE IN clauses

2005-09-23 Thread Tony Seebregts
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

Re: derby performance and 'order by'

2005-09-23 Thread Oyvind . Bakksjo
Rick Hillegas wrote: Thanks for the pointer to this presentation, Oyvind. It's a pretty startling observation though I'm not sure how to use it. I'd be interested in hearing your thoughts about this some time. The question raised in this presentation is whether the optimizers in the

Re: Locks not released on error

2005-09-23 Thread Øystein Grøvlen
LC == Lars Clausen [EMAIL PROTECTED] writes: LC Hi! LC We're using Derby version 10.1 (Bundle-Version: 10.1.100.208786) LC embeddedly in our system. Even though I've put extensive rollback and LC statement closing handling in the code, we still occasionally see cases LC

Re: Locks not released on error

2005-09-23 Thread Lars Clausen
On fre, 2005-09-23 at 09:43, Øystein Grøvlen wrote: LC == Lars Clausen [EMAIL PROTECTED] writes: LC Hi! LC We're using Derby version 10.1 (Bundle-Version: 10.1.100.208786) LC embeddedly in our system. Even though I've put extensive rollback and LC statement closing

Re: JDBC and WHERE IN clauses

2005-09-23 Thread Satheesh Bandaram
Don't think you can do this in Derby. However, you can do: SELECT * FROM Names WHERE ID IN (?, ?, ?) and bind individual elements of the array to each of the parameters. This, of course, forces you to know the number of elements of the array.. Satheesh Tony Seebregts wrote: Hi, Does

Re: JDBC and WHERE IN clauses

2005-09-23 Thread Rick Hillegas
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

Re: Too narrow column display width using ij.

2005-09-23 Thread Satheesh Bandaram
If you add a cast to 'columndatatype', you can achieve the 'minimumDisplayWidth' like functionality. ij select columnname, cast(columndatatype as char(20)) from sys.syscolumns where referenceid in (select tableid from sys.systables a, sys.sysschemas b where a.schemaid=b.schemaid and

Re: Too narrow column display width using ij.

2005-09-23 Thread wolfgang127us
Hi Satheesh, Thank you for your quick response. It works pretty good. :) wolfgang If you add a cast to 'columndatatype', you can achieve the'minimumDisplayWidth' like functionality. ij select columnname, cast(columndatatype as char(20))from sys.syscolumns where referenceid in