I'm trying to create a page which has a list of values (P2_LIST) and a region which displays the contents of the table based upon the table name in this list
e.g.
select * from :P2_LIST
however I can't save it as I get:
ORA-06550: line 1, column 21: ORA-00903: invalid table name
P2_LIST is a LOV with a list containing valid table names only.
Is there a way to do this?
When I do select P2_LIST from dual I can see it holds the correct TABLE_NAME and if I hardcode the table names then it returns also.
The idea is I can then add more tables to this page simply by adding an entry to the shared component.
If this can be resolved my next part is I want to use a concatenated value for this too:
e.g. If I have two tables:
- thisistable_1 - submit thisistable
- thisisnottable_1 - submit thisisnottable
Then I want to use something along the lines of:
select * from :P2_LIST||_1
that way I can use the same LOV elsewhere.
I am running: Application Express 5.0.3.00.03
dbms_sqlpackage to describe columns and fetch data. As for me - too much efforts when more simple solution exists. May be if you have 100+ tables... - Dmitriy