| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> runtime tablenames in stored procedure.
Hi all,
Is there a way to provide the table names to a stored procedure at runtime.. ?
I would like to select say, 'login_name' from 3 different tables and use them in a similar way, but the table names should be flexible enough to be determined at runtime.
I have the code below, but it wouldn't
compile.
replace.sql
***************************************set echo on
create or replace procedure ReplaceLoginNamesWithEmpId(
table_name in char,
handle_mgr in char)
cursor ID_CURSOR is
select otheruserid,login_name
from known_users,table_name
where login_name = known_users.web_username ;
empid varchar(200);
logname varchar(200);
begin
open ID_CURSOR;
for curs_id_rows in id_cursor
loop
fetch ID_CURSOR into empid,logname;
-- insert into dummy_copy values(empid);
end loop;
commit;
please cc to kagopi_at_hotmail.com.
thanks,
gopinath
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Jan 17 2000 - 16:57:47 CST
![]() |
![]() |