Re: SQL*Loader newbie
Date: Sun, 03 Nov 2002 00:13:50 -0800
Message-ID: <3DC4DABD.37664136_at_exesolutions.com>
Holger Reisert wrote:
> Hi,
>
> I have a few questions concerning to SQL*Loader.
>
> 1) Example: I have to import a text file ( order.txt ) like this:
>
> OrderNr CustomerNr...................................
> 1001 0001
> 1002 0011
>
> I want to import this file in a table named 'Orders' which looks like this:
>
> OBJ_IDENT ORDER_NR FK_CUST_ID ...................................
> 1 1001 2
> 2 1002 10
>
> Another table contains the Customers:
>
> OBJ_IDENT CUST_NR ..........................
> 2 0001
> 10 0011
> and so on.
> Is it possible to dissolve the Customer foreign keys?
> If yes, can you please give me syntax examples for the control file?
>
> 2) How can I check the fixed length of the lines?
> If one line has not the right length the complete file shouldnīt be
> imported.
>
> Thanks for your Help.
> In the OH examples I havenīt found any answers to my questions.
[Quoted] [Quoted] Please translate the concept of dissolving a foreign key. Do you, perhaps, mean resolve?
SQL Loader can not determine the length of a line. You have two choices if it
is an issue.
1. Use SQL*Loader to import into a staging table and then validate the record
before parsing with a storedf procedure.
2. Import using UTL_FILE.
[Quoted] Had you indicated a version number, you didn't, and if you have 9i you could [Quoted] look at using the file as an external table.
Daniel Morgan Received on Sun Nov 03 2002 - 09:13:50 CET