Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL:Generic Search over several Tables
Hi,
I want to store table names (to be precise: links to remote tables via
SQLNET) in a database table and then use these names to connect to all
tables with one generic SQL-Statement.
This should look like:
cursor names_cursor is select t_name from table_names; t_names names_cursor%rowtype;
begin
open names_cursor;
loop fetch names_cursor into t_names; exit when names_cursor%NOTFOUND; select * from t_names.t_name; end loop;
My question is: Is there any way to use some kind of variable as a table (or database link) name in PL/SQL? It would be easy with embedded SQL in perl or serverside javascript, but I'd like to keep it all in oracle itself.
Any help appreciated
Dirk Received on Tue Aug 04 1998 - 10:41:17 CDT
![]() |
![]() |