Re: [Q] Loading data file name through SQL*Loader

From: Kevin P. Fleming <kpfhome_at_primenet.com>
Date: 1995/08/12
Message-ID: <40hced$s07_at_nnrp1.primenet.com>#1/1


In article <richard_avery-070895114143_at_nnsgm25.lon40.nt.com>,

   richard_avery_at_nt.com (Richard Avery) wrote:
>We want to load the name of the data file in which a record was found into
>a table as part of a SQL*Loader run. This does not seem to be supported
>within a loader ctl file.
>
>There is a value RECNUM which inserts the record number within the file,
>this seems fairly pointless if you cannot specify the name of the file too.
>
>We are running under HP/UX 9 (Unix) and Oracle Financials Rel 10.5, the ctl
>file must be a separate entity and cannot be embedded within a shell script
>which could solve the problem.
>
>Does anyone know of a way to achieve this under loader, otherwise I may
>have to resort to pre-processing the ctl file before calling it.
>
>TIA,
>Richard Avery
>

But doesn't your .CTL file have to explicity include the file name anyway? If so, you had to put the name into the .CTL file, so there should be some way to put into a column as well....

Now that I think about it, the best way to do this may be through the use of the SQL statement option for the column you want to put the file name into. There's no way to get SQL*Loader to put a literal value into a column, but you write a simple SQL expression with just the file name in a literal. It would slow down your import some, though.

Kevin Fleming, Reliable Networx, Inc.
Phoenix, AZ
Internet: kpfhome_at_primenet.com

"Please, don't change colors while I'm talking to you." Received on Sat Aug 12 1995 - 00:00:00 CEST

Original text of this message