Christoph Walser <wals...@ee.ethz.ch>
wrote:
> I have a table A with a row called 'services' which contains the names
> of other tables.

I recommend you change your design. You'll have nothing but trouble with 
this.

Merge all tables into a single table with the extra "service" column.

> What I want to do is to query table A and get from it
> the name of table B which is then accessed.
> What I tried is the following:
>
> SELECT *
> FROM (
> SELECT service
> FROM A
> WHERE a_key = 1
> )

No, this is not going to work, nor anything substantially similar. You 
will have to use "SELECT service FROM A WHERE a_key = 1" in your 
application to retrieve the table name, then build "select * from 
tableName" query on the fly.

Igor Tandetnik



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

Reply via email to