Re: SQL Loader
Date: Fri, 22 Aug 2003 17:27:11 -0700
Message-ID: <3F46B4DF.942E81FA_at_exxesolutions.com>
Ralph Bilger wrote:
> Hi all,
> I am trying to user sqlldr to import data from two files (with different
> structure) into one Oracle table.
> E.g.:
> Two data files have to be loaded into table "data":
>
> data1.txt:
> pk; txt1; txt2
> 1; "a"; "b"
> 2; "d"; "e"
>
> data2.txt:
> pk; txt3
> 1; "c"
> 2; "f"
>
> Table "data" should contain the following information after the load:
> pk; txt1; txt2; txt3
> 1; "a" ; "b"; "c"
> 2; "d"; "e"; "f"
>
> I can read the first data file using sqlldr with the following control file:
>
> LOAD DATA
> INFILE 'data1.txt'
> INSERT
> INTO TABLE data
> FIELDS TERMINATED BY ";"
> OPTIONALLY ENCLOSED BY '"'
> (pk,
> txt1,
> txt2)
>
> But how can I read the second data file in order to update the table?
>
> Regards,
> Ralph
This may be what you are looking for:
LOAD DATA
INFILE 'c:\temp\demo9a.dat'
INFILE 'c:\temp\demo9b.dat'
APPEND INTO TABLE ....
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Sat Aug 23 2003 - 02:27:11 CEST