Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: [NEWBIE] SQLLOADER - Load from multiple files

Re: [NEWBIE] SQLLOADER - Load from multiple files

From: Andy <andrew.mcghie_at_gmail.com>
Date: 31 Aug 2004 08:00:02 -0700
Message-ID: <2e5b8ae5.0408310700.647f10f9@posting.google.com>


Daniel and DB,

Why don't you dynamically create the control file at runtime? For example:

echo "LOAD DATA" > dyn_control.ctl
for datafile in `ls *.dat`; do

   echo "INFILE $datafile" >> dyn_control.ctl done
echo "INTO TABLE table1 ...." >> dyn_control.ctl

Andy

"dbman63" <dbman63_at_yahoo.com> wrote in message news:<DHZSc.876$qB1.170_at_fe25.usenetserver.com>...
> To qualify my post - I consider myself a programming "newbie" but am Oracle
> 8i certified & have 5 years experience using oracle 7.3.4 & 8i. I'm working
> on a similar project and had the same question. I'm fortunate that I only
> have to deal with one file at runtime, so I'm considering forcing the
> output from the other database to consistently use the same file name, or
> perhaps copy it to an archive & then rename it (to the consistent name in
> the control file) with a batch file that would also call SQLLoader. I'm
> still in the conceptual / design stages though...
>
> Regards,
> db
>
> "Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message
> news:1091758948.416507_at_yasure...
> > Emanuele wrote:
> > > Hi,
> > > i've to load data from multiple file
> > > (eg.
> > > data01.dat
> > > data02.dat
> > > data03.dat
> > > data04.dat
> > > )
> > >
> > > but i can now these file's name only in runtime, when i launch the
> > > sqlloader command. So I cannot specify them on controlfile.
> > >
> > > How it works with sqlloader?
> > >
> > > Thx!!
> >
> > Not well unless you use Perl or another scripting language.
> >
> > --
> > Daniel A. Morgan
> > University of Washington
> > damorgan_at_x.washington.edu
> > (replace 'x' with 'u' to respond)
> >
Received on Tue Aug 31 2004 - 10:00:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US