Passing args to sqlldr?

From: Steve Wertz <psyclops_at_netcom.com>
Date: 1997/05/28
Message-ID: <psyclopsEAwq2q.1tF_at_netcom.com>#1/1


[Quoted] For sqlldr (under Unix), I'd like to be able to pass an argument into SQL-Loader, and use that argument as the value for a paritcular field. Can this be done? The argument would be the first two characters of a file name. It would look something like this in a shell script..

for fname in *sales.txt; do

   prefix=`echo $FNAME|cut -c1-2`
   sqlload / loadsales.ctl data=${prefix}sales.txt done

I want to be able to pass "prefix" somehow into the control file to use as a column value.

Depending on whay my control file eventually looks like, I could probably 'sed' the control file and change it dynamically for each itteration, but I'm looking for a more graceful way to do this (not that I'd know the sed syntax anyway ;-)

TIA! -sw Received on Wed May 28 1997 - 00:00:00 CEST

Original text of this message