Re: [sqlite] Variable number of parameters in a prepared statement's IN clause

2014-07-21 Thread dada
I would like to +1 the idea about virtual talbe. Using variable number of '?'s is never the option. You must know that there is limit to how many '?'s can be there. One day this approach will stab you in the back. The very day when you will need to bind more elements than limit value. > >

Re: [sqlite] Variable number of parameters in a prepared statement's IN clause

2014-07-21 Thread dada
I would like to +1 the idea about virtual talbe. Using variable number of '?'s is never the option. You must know that there is limit to how many '?'s can be there. One day this approach will stab you in the back. The very day when you will need to bind more elements than limit value. > >Is it

Re: [sqlite] Variable number of parameters in a prepared statement's IN clause

2014-07-20 Thread Jason Gilbert
I recently saw someone suggest using a fixed number of '?' for the max number of allowed values and fill the unused positions with 'null'. Sounds plausible, but I don't know what the performance implications would be. On Sun, Jul 20, 2014 at 5:07 PM, Donald Shepherd

Re: [sqlite] Variable number of parameters in a prepared statement's IN clause

2014-07-20 Thread Donald Shepherd
Thanks all for the suggestions. They're a great help. On 21 July 2014 11:06, Keith Medcalf wrote: > > > >Is it possible to have a variable number of parameters in an IN clause in > >a prepared statement, i.e. "select * from Table where Col1 in > >(?,?,?,...);"? > > >Or do

Re: [sqlite] Variable number of parameters in a prepared statement's IN clause

2014-07-20 Thread Keith Medcalf
>Is it possible to have a variable number of parameters in an IN clause in >a prepared statement, i.e. "select * from Table where Col1 in >(?,?,?,...);"? >Or do I need a constant number of parameters in there to be able to re- >use the prepared statement? The closest solution would be to

Re: [sqlite] Variable number of parameters in a prepared statement's IN clause

2014-07-20 Thread Darren Duncan
On 2014-07-20, 5:07 PM, Donald Shepherd wrote: Is it possible to have a variable number of parameters in an IN clause in a prepared statement, i.e. "select * from Table where Col1 in (?,?,?,...);"? Or do I need a constant number of parameters in there to be able to re-use the prepared statement?

Re: [sqlite] Variable number of parameters in a prepared statement's IN clause

2014-07-20 Thread Igor Tandetnik
On 7/20/2014 8:07 PM, Donald Shepherd wrote: Is it possible to have a variable number of parameters in an IN clause in a prepared statement, i.e. "select * from Table where Col1 in (?,?,?,...);"? Or do I need a constant number of parameters in there to be able to re-use the prepared statement?

[sqlite] Variable number of parameters in a prepared statement's IN clause

2014-07-20 Thread Donald Shepherd
Is it possible to have a variable number of parameters in an IN clause in a prepared statement, i.e. "select * from Table where Col1 in (?,?,?,...);"? Or do I need a constant number of parameters in there to be able to re-use the prepared statement? Thanks for any help, Donald Shepherd.