how to assign the database link dynamically to a table [message #38587] |
Mon, 29 April 2002 08:24 |
ksr
Messages: 112 Registered: January 2002
|
Senior Member |
|
|
Hi,
I want to select the records from different database(same table existing on all the database) and update them.
I have 3 separate database,so i have created 3 different database links.I want to assign the 3 different database links to the select statement one after the another and update the tables.
I want something like this..
create or replace procedure test() is
arr1(1):= lnk.db1.com;
arr1(2):= lnk.db2.com;
arr1(3):= lnk.db3.com;
cursor c1 is select * from table1@ --want to assign database links
---------------------------------------
How to assign the differnt database links to the cursor (table name )dynamically..or if not through cursor is there any other way...
begin
for 1 ..array count loop
for cursor in c1 loop
update table@ --again assign the database link here..
end loop;
end loop;
end;
How do i write this code..
|
|
|
|
|
|