Select from unknown table [ANSWERED]
631582Apr 1 2008 — edited Apr 5 2008I have a table that indexes physical table names with IDs as follows:
idxer
-------
idx. tbl_nm
1. employee_tbl
2. cmpny_tbl
I have tried constructing a query that will get data from the table whose index is provided as follows:
SELECT *
FROM (SELECT tbl_nm FROM idxer WHERE idx = 1)
The problem is since the inner select returns a string (as I imagine it) the outer select just returns that string. What I want is the inner select to be evaluated as a table name.
Any help will be appreciated.
Hussam.
Message was edited by:
user628579