We have a similar task and we solve it by using a statement with lots of parameters SELECT * FROM table WHERE tableId IN (?, ?, ?, ?, ....)
The number of "?", let's call it N, is fixed, and set to ~100 -- tuned by measuring performance. When the actual number of parameters is less than N, we bind the rest of the parameters to NULL. When the actual number of parameters is greater than N, we issue several queries and combine the result manually. Another way would be to create a table in a temporary database and INSERT ... SELECT into it several times. However, this approach may not work if you have NOT conditions applied to the bound parameters or the result of the selection based on them. Hope this helps. -- Igor Sam Carleton-2 wrote: > > Is there any way to bind to this query? > > SELECT * FROM table WHERE tableId IN ( ? ); > > Where ? should be 1,2,3,4 > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > -- View this message in context: http://old.nabble.com/binding-an-IN-tp29135222p29137009.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users