SQL*Loader: Loading infile name into a field

From: Mike S. <mis1965_at_yahoo.com>
Date: Sat, 06 Nov 1999 06:13:18 GMT
Message-ID: <3823c328.4581087_at_news.metro.net>



Is there a way to get SQL*Loader to load the INFILE parameter into a field? I'm importing files into the same table and would like to be able to trace each record to its original source. I'm running Oracle 8.04 under Windows 95 and invoking SQL*Loader from a batch file. The batch file takes the import file name as a command-line argument and passes it to SQLLDR80.EXE as "%1" as in this excerpt:

sqlldr80 userid=Mike control=expand.ctl data=%1.dat log=%1.log bad=%1.bad

I could edit the control file each time to add the import file name as constant data, but I'm wondering if there's a way to access the name entered from the command line. Something along the lines of

filename POSITION(060:074) CHAR ":in_file",

would be nice (that line made SQL*Loader hang). Another idea was to set an environment variable in the batch file, but I haven't found a way to access it in the control file. Does anyone have any thoughts on this? Received on Sat Nov 06 1999 - 07:13:18 CET

Original text of this message