Re: SQL Loader uploading hundreds of files .

From: Erik Ykema <Erik.SIHTEVOMER.Ykema_at_xs4all.nl>
Date: Fri, 18 Apr 2003 21:21:46 +0200
Message-ID: <3ea05063$0$49098$e4fe514c_at_news.xs4all.nl>


or, when on unix/aix, write kornshell-scripts that loop through all the filenames to be processed, dynamically write to the filesystem the appropriate sql*loader-controlfile with some fixed values for the for the extra fields, and call sql*loader.
> If you need help on this, drop me a note.
Good Luck,
Erik Ykema

"Georg Scholz" <georg.scholz_at_vienna.at> wrote in message news:WjQna.106449$UR.920578_at_news.chello.at...
> Hm it seems SQL Loader has no possibility to parse the filename and use it
> subsequently for operations.
>
> I in that case would write a simple script (e.g. in Visual Basic, or even
> VBA in Excel, Word, etc.), which creates the Control Files; then I would
> call SQL Loader.
>
> If you need help on this, drop me a note.
>
> Georg
>
>
>
>
>
>
>
>
>
> "nullpointer" <null_pointer_at_rediffmail.com> schrieb im Newsbeitrag
> news:c0728f9d.0304180130.7d8f901d_at_posting.google.com...
> > Hi Tom,
> > I have to load an oracle table with lots of employee data. The
> > problem is that this data comes to me in several CSV (Comma separated
> > values) files. Now Each filename is an identifier telling me the
> > category of the employees (Billable, Associate, Float ... and many
> > more), the location (M, C , T) and the dept they belongs to (Sales,
> > Marketing, Finance).
> > So a file name is typically like :
> >
> > BILLABLE_M_S.csv = BILLABLES for MUMBAI location and SALES dept
> >
> > I get around 324 (36 categories, 3 locations and 3 departments).
> > These files differ in the number of fields that they capture. Some
> > capture 15 fields while others may capture only 10. But the files for
> > each category are in the same format.
> > In My table I have 4 columns more than the files these are CATEGORY,
> > LOCATION, DEPARTMENT, AS_ON_DATE. Now while loading these files I have
> > to load the appropriate values in the table depending on the filename.
> > Is this possible in SQL loader ? I can load the SYSDATE easily but how
> > do I go around identifying the file and loading the appropriate values
> > ? Or do I have to write 324 control files which I really want to
> > avoid. Can it be done using 36 one for each category control files
> > which is still manageable.
> >
> > As far as I could figure out from the documentation there is no
> > variable in the control file syntax which can be passed from the
> > command line. Neither is there a variable for the filesname which I
> > can manipulate.
> >
> > Any help will be appreciated.
> >
> > Thanks Dev
>
>
Received on Fri Apr 18 2003 - 21:21:46 CEST

Original text of this message