"Carl Bretteville"
<cbrettevi...@gmail.com> wrote in message
news:24f328900905180515n3ef4bd72h96777a3a37054...@mail.gmail.com
> I'm trying to find the best and most efficient way to build a
> "select" query that uses "in" from C-code where the number of values
> in the list varies from query to query. The sql statement will look
> something like this:
>
>    select * from table1 where name in (name1... nameX)

Create a temporary table, populate it with your names, then do

select * from table1 where name in (select name from myTempTable);

You can use prepared statements for all parts of this process.

Igor Tandetnik



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to