Re: SQL*Loader and multiple tables?

From: miguel <jmiguel_at_cet.pt>
Date: 1998/02/10
Message-ID: <01bd3613$b2a9e880$0a0a2c0a_at_jmiguel.cet.pt>#1/1


Gary G <tolimits_at_pil.net> wrote in article <6b9sgr$k0o_at_netaxs.com>...
> Hi,
> I'm facing a situation where I have data coming to me in two possible
 ways:
>
> 1) Each table in separate file, coma delimited, enclosed in quotes
> 2) All tables in one file, coma delimited, enclosed in quotes, separated
 by
> "INSERT INTO" or some other clause....
>
> What would be a best approach to load above into into DB? I can't seem to
> figure out the syntax for above, or wether its possible at all.....sure
 hope
> it is. I can't imagine that there is no better way of doing rather one
> table at a time.
>
> About 300 tables
> Oracle 7.3.3/NT 4
> Thanks,
> Gary Gorbonosov
> tolimits_at_pil.net
> /* Comment your code & nobody gets hurt */
>
>
>
>

To use the second approach you must have adjacent columns, on the text file, to the same table.
Example:

  1. TEST.TXT (A,B,C,D,E) where you wan´t to load column A,B,C to TABLE1 and D,E to TABLE2.

On test.ctl:
LOAD DATA
INTO TABLE1
(A integer externally terminated by ",",  B ...,
 C...)
INTO TABLE2
(D....,
 E....)

prompt>SQLLDR
username/password,'.../test.ctl','.../test.log','..../TEST.TXT'

I hope this help you
MIGUEL Received on Tue Feb 10 1998 - 00:00:00 CET

Original text of this message