Home » SQL & PL/SQL » SQL & PL/SQL » how to insert data multiple bases using the multiple database links? (windows xp)
how to insert data multiple bases using the multiple database links? [message #573741] Wed, 02 January 2013 23:01 Go to next message
nvsr
Messages: 54
Registered: December 2011
Location: HYDERABAD
Member

Hai...

how to insert the data in multiple bases( Same table structure in different bases) using the multiple database links?

please guide me...
Re: how to insert data multiple bases using the multiple database links? [message #573744 is a reply to message #573741] Wed, 02 January 2013 23:18 Go to previous messageGo to next message
BlackSwan
Messages: 23140
Registered: January 2009
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/

>how to insert the data
I give up.
to what data do you refer?
INSERT into which tables in which DBs?

We only know what you post which currently amounts to ZERO facts & details
Re: how to insert data multiple bases using the multiple database links? [message #573752 is a reply to message #573744] Thu, 03 January 2013 00:18 Go to previous messageGo to next message
Littlefoot
Messages: 19884
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I guess you'll do that using multiple INSERT statements, such as
insert into table@db_link_1 (col1, col2, ..., coln) select col1, col2, ..., coln from source_table;
insert into table@db_link_2 (col1, col2, ..., coln) select col1, col2, ..., coln from source_table;
...
insert into table@db_link_n (col1, col2, ..., coln) select col1, col2, ..., coln from source_table;
Re: how to insert data multiple bases using the multiple database links? [message #573756 is a reply to message #573752] Thu, 03 January 2013 00:50 Go to previous messageGo to next message
Michel Cadot
Messages: 59982
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
or:
insert all
  into table@db_link_1 (col1, col2, ..., coln) values (col1, col2, ..., coln)
  into table@db_link_2 (col1, col2, ..., coln) values (col1, col2, ..., coln)
  ...
  into table@db_link_n (col1, col2, ..., coln) values (col1, col2, ..., coln)
select col1, col2, ..., coln from source_table;

Regards
Michel
Re: how to insert data multiple bases using the multiple database links? [message #573759 is a reply to message #573756] Thu, 03 January 2013 01:04 Go to previous message
Littlefoot
Messages: 19884
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
VALUES is optional, so it can be shortened to
insert all
  into table@db_link_1 (col1, col2, ..., coln)
  into table@db_link_2 (col1, col2, ..., coln)
  ...
  into table@db_link_n (col1, col2, ..., coln)
select col1, col2, ..., coln from source_table;
Previous Topic: Calculate Working Day
Next Topic: Procedure changes
Goto Forum:
  


Current Time: Thu Dec 18 11:54:11 CST 2014

Total time taken to generate the page: 0.06889 seconds