Re: SQL Loader

From: David Scott <dlscott_at_mindspring.com>
Date: Mon, 25 Aug 2003 03:08:47 GMT
Message-ID: <35f2b.10881$8i2.8965_at_newsread2.news.atl.earthlink.net>


[Quoted] [Quoted] Sorry, friend, but SQL*Loader does NOT do updates on tables.

However, all is not lost. All you need to do is: 1- load the two files into 2 separate tables 2- create a join query that combines the data. For example: select a.pk, a.txt1, a.txt2, b.txt3 from a,b where a.pk = b.pk 3- convert the join query into a CTAS (create table as select) statement. For example:
create table COMBINED as
 select a.pk, a.txt1, a.txt2, b.txt3 from a,b where a.pk = b.pk

There are other ways, of course, but this is a start. But SQL*Loader does not EVER do updates.

David

"Ralph Bilger" <ralph.bilger_at_uni-tuebingen.de> wrote in message news:bi66ts$78c$1_at_newsserv.zdv.uni-tuebingen.de...
> 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
>
>
Received on Mon Aug 25 2003 - 05:08:47 CEST

Original text of this message