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: how to use exp/imp only for specific columns?

Re: how to use exp/imp only for specific columns?

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Wed, 24 Mar 2004 12:59:03 +0100
Message-ID: <40617853$0$18781$636a15ce@news.free.fr>

"alederer" <alederer_at_gmx.at> a écrit dans le message de news:40616570$1_at_e-post.inode.at...
> hallo!
>
> i have for example the following situation:
>
> a table on site a tab1(a_key integer,
> a_val1 varchar(500),
> a_val2 varchar(1000))
>
> and a table on site b tab2((b_key integer,
> b_val2 varchar(1000),
> b_val3 integer)
>
> is it possible to use the export/import utility or the sql loader to
> transfer only the data of the columns a_key and a_val2 from tab1 to
> tab2(into b_key, b_val2)?
>
> in the documentation of export, i have only found the QUERY parameter,
> but it can only limit the rows not the columns which should be exported.
>
> if i have a direct database connection i can use
> "insert into tab2(b_key,b_val2) (select a_key, a_val2 from tab1)"
>
> but how can a make this with export/import utility or sql loader?
>
> what i need is a way to export only specific columns of a table and to
> import these export into tables with different column names and order.
>
> where can i find the missing information?
>
> thanks
> andreas

You can execute your first query with SQL*Plus and spool the result in a file which can be loaded with SQL*Loader.

Regards
Michel Cadot Received on Wed Mar 24 2004 - 05:59:03 CST

Original text of this message

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