It won't work due to syntax. Try putting a select statement as the when part of the case statement.
Woody wizard at large(I'm in shape. Round is a shape) Connected by MOTOBLURâ„¢ on T-Mobile -----Original message----- From: John <tauru...@gmail.com> To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Sent: Wed, May 11, 2011 18:17:14 PDT Subject: [sqlite] Can I dynamically select a table? So now I know that case can return column names. But is there a way to tell it from which table to select. Earlier I assumed that it is not possible. But know I requestioning everything. This, at least, has not worked: create table t1 (col integer); create table t2 (col integer); select * from (select case when 1=1 then t1 else t2 end); Thanks. -- ~John _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users