Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> hi stephen,
hi stephen,
You can do this by writing a shell script. I have done this by loading =
multiple infiles
at commnad line.=20
usage $junk_load.sh a.ctl b.ctl c.ctl
----------junk_load-----
SPOOLFILE=3D/tmp/junk_load.$$ =20 INFILES=3D$* =20 DDAT=3D$$.`date "+%Y%m%d"` =20 LOGFILE=3D/tmp/ctel_load.$DDAT =20 CTLFILES=3D`ls -1 $INFILES 2>/dev/null` =20 =20 if [ ! "$CTLFILES" ] =20 then =20 echo "ERROR. $INFILES not found." =20 echo "$0 cancelled at `date`" =20 exit 1 =20 fi =20 =20 #More than one file could be found, so process all of them. for i in $CTLFILES =20 do =20 echo "Processing $i..." =20
bye=20
NAREN
=20
Dick Goulet
____________________Reply Separator____________________ Author: "Stephen Andert" <StephenAndert_at_firsthealth.com> Date: 7/11/00 11:10 AM
Can I use a variable in the INFILE string in a CTL file for sqlloader?
i.e. the line currently reads:
INFILE '/m17/oradata/work/qtr1/db_file1.ing'
and I would to have something like=20
X =3D '/m17/oradata/work/qtr1'
INFILE $X/db_file1.ing
The reason is that I have 32 ctl files and am loading data for many =
different
qtr's and am changing the ctl files every time. I guess it might be =
easier to
just move the data files into a temp directory for loading, then move them =
out
when done and move the next batch in. =20
Thoughts?
Stephen Andert
--=20
Author: Stephen Andert
INET: StephenAndert_at_firsthealth.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). --=20
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may Received on Tue Jul 11 2000 - 18:06:50 CDT