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

From: Turkbear <john.g_at_dot.spamfree.com>
Date: Wed, 24 Mar 2004 11:59:47 -0600
Message-ID: <j3j360d39ufiur9hc8glldcncgv2g6ohtq_at_4ax.com>


The OP indicated 2 problems with this approach, a slow connection between sites and 17Gb of data...

simmons_mark_at_yahoo.com (Mark) wrote:

>Andreas,
>
>I think I read that the "COPY" command in sqlplus was going away in
>10g. That's too bad. It was great for little one-off jobs like this.
>
>If you have 9i or below you can still schedule it this way:
>
>/* I believe remotedb must be in your tnsnames.ora file. */
>sqlplus user/pass_at_localdb <<EOF 1> logfile 2>&1
>sql> set copycommit 100;
>sql> set long 1000000; -- only necessary if you are copying a long
>value
>sql> copy from remotedb append tab2(b_key, b_val2) using select a_key,
>a_val2;
>EOF
>
>Mark Simmons
>Sr. Oracle DBA
>Sabre-Holdings, Southlake, TX
>
>
>alederer <alederer_at_gmx.at> wrote in message 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
Received on Wed Mar 24 2004 - 18:59:47 CET

Original text of this message