Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Select from unknown table [ANSWERED]

631582Apr 1 2008 — edited Apr 5 2008
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 3 2008
Added on Apr 1 2008
12 comments
1,675 views