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

From: Kevin A Lewis <Kevin_A_Lewis_at_Hotmail.com>
Date: Wed, 24 Mar 2004 15:40:11 GMT
Message-ID: <vZh8c.9$Qy4.8_at_newreader.ukcore.bt.net>


Ok

How about if you use the form in this example from the manual. The Key bit being
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' Surely the chances of the data containing the combination "," other than between field, columns would be very low.

Regards Kevin

CREATE TABLE emp_external (
employee_id NUMBER(6),

last_name VARCHAR2(20),

email VARCHAR2(25),

hire_date DATE,

job_id VARCHAR2(10),

salary NUMBER(8,2)

)

ORGANIZATION EXTERNAL (TYPE oracle_loader

DEFAULT DIRECTORY admin

ACCESS PARAMETERS (

RECORDS DELIMITED BY newline

BADFILE 'ulcase1.bad'

DISCARDFILE 'ulcase1.dis'

LOGFILE 'ulcase1.log'

SKIP 20 FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' (

deptno INTEGER EXTERNAL,

dname CHAR,

loc CHAR

)

)

LOCATION ('ulcase1.dat')

)

REJECT LIMIT UNLIMITED; "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 - 16:40:11 CET

Original text of this message