Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL loader unix script with multiple files
"Radoulov, Dimitre" <cichomitiko_at_gmail.com> wrote in message
news:459a6286$0$49208$14726298_at_news.sunsite.dk...
>
> <mnemonic01_at_hotmail.com> wrote in message
> news:1167743498.542541.64490_at_k21g2000cwa.googlegroups.com...
>> No I'm facing another challenge
>>
>> the datafile is with every load another one
>> name= schemaname_"controlfilename_without_ctl"_loaddate.dat
>> so what I'd like to is:
>> in the sqlloader syntax load the proper datfile belonging to the
>> controlfile, which is available at that moment
>> otherwise about a 100 ctl has to be edited every time a load takes
>> place to specify the infile
[...]
> for ctl in "${DATADIR}"/ctl/*.CTL; do
> dfdir="$(dirname $ctl)"
> dfname="$(basename $ctl)"
> echo sqlldr "${SCHEMA}"/"${SCHEMAPWD}" \
> control="$ctl" log="${ctl%.*}" \
> datafile="${dfdir}"/schemaname_"${dfname%.*}"_loaddate.dat
> done
And of course, remove the "echo" command from the example above :)
Regards
Dimitre
Received on Tue Jan 02 2007 - 07:52:54 CST