On 12 Aug 2009, at 11:35pm, Igor Tandetnik wrote:

> Bill Welbourn <biostats...@yahoo.com>
> wrote:
>> I am new to the forum and have a question regarding querying data
>> from a table, where the table name is random. For example, I have a
>> database possessing upwards of 41 tables named, TAB10, TAB11,...,
>> TAB50, and would like to query each table.
>
> Consider instead having a single table with an extra column containing
> values 10, 11, ... , 50. You'll have no end of trouble with your  
> current
> design.

I second this advice.

>> Question: Within the C programming environment, is it possible to
>> prepare a sqlite SELECT query with a random table name as a
>> variable/parameter?
>
> No. Which is precisely why you should reconsider your design.

Although you can do it by executing your queries as simple text  
commands using _execute rather than using _prepare and _step.

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

Reply via email to