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

Home -> Community -> Usenet -> c.d.o.server -> Re: export multiple tables and import in a single one

Re: export multiple tables and import in a single one

From: Vincent <mortimer59_at_hotmail.com>
Date: Wed, 12 Dec 2007 07:30:40 -0800 (PST)
Message-ID: <fc2aa476-a096-4763-ae94-fabd65af52ca@e6g2000prf.googlegroups.com>


On 12 déc, 14:39, EdStevens <quetico_..._at_yahoo.com> wrote:
> On Dec 12, 6:57 am, Vincent <mortime..._at_hotmail.com> wrote:
>
> > On 12 déc, 12:30, one..._at_gmail.com wrote:
>
> > > and i have an other method :
> > > what about insert into ..as select ...?
>
> > Do you mean build my result by a "select 'insert into login values('
> > || field1 || ',' || field2 || ');' from user1.login" and then output
> > that in a SQL file that I will execute in my destination database ?
>
> > If it's the only way, I think I'll do like that but I would prefer to
> > use exp / imp tools, easier to maintain afterwards than build SQL
> > queries.
> > Thanks.
>
> In your source database:
>
> create table combined_login as
> select * from user1.login;
>
> insert into combined_login (
> select * from user2.login)
>
> insert into combined_login (
> select * from user2.login)
>
> then export combined_login, import it into your target database and
> rename it whatever you want.

Yes, should work... I had this idea at the begining but I didn't want to duplicate all data, it's why I chose to create a view instead... but maybe I will try this option...
thx. Received on Wed Dec 12 2007 - 09:30:40 CST

Original text of this message

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