Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL*Loader question

Re: SQL*Loader question

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Wed, 14 May 2003 17:37:59 GMT
Message-ID: <MPG.192c1ecf6c02da3a989781@news.la.sbcglobal.net>


andyho99_at_yahoo.com said...
> Hi,
>
> I am trying to load a flat file into Oracle tables using SQL*Loader.
> There are 5 record types in the file. Only record type 1 is mandatory.
> In other word, the file is arranged by a group fashion. Each group may
> contain 1 to 5 records for each record type. Each record type will be
> loaded to corresponding target table. I need to generate sequence
> number for record type 1, and the remaining records in the same group
> should use the sequence number created for the record type 1.
>
> Can I achieve what I want using SQL*LOADER? I couldn't find any
> control file examples that load multiple table and subsequent tables
> using the value from first table. Thanks
>

Have you looked at the AskTom site for control file examples? You might want to check out this article (will wrap):

http://asktom.oracle.com/pls/ask/f?p=4950:8:1090762::NO::F4950_P8 _DISPLAYID,F4950_P8_CRITERIA:599659967845, But Tom recommends using PL/SQL and UTL_FILE to more easily process these kinds of files.

You didn't say which version of Oracle you're using, but I understand that 9i can refer to external files as if they were tables (I don't use 9i here, so I can't verify that).

-- 
/Karsten
DBA > retired > DBA
Received on Wed May 14 2003 - 12:37:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US