Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL:Generic Search over several Tables

PL/SQL:Generic Search over several Tables

From: broder <broder_at_phase26.de>
Date: Tue, 04 Aug 1998 17:41:17 +0200
Message-ID: <35C72B9D.E508B290@phase26.de>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US