"Carl Bretteville"
<[email protected]> wrote in message
news:[email protected]
> 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
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to