Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL*Loader question
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 > DBAReceived on Wed May 14 2003 - 12:37:59 CDT
![]() |
![]() |