Re: SQL Loader: How to skip fields?

From: Stuart Turton <sturton_at_maderich.demon.co.uk>
Date: Wed, 02 Feb 2000 12:37:14 +0000
Message-ID: <389824F9.ED747AB3_at_maderich.demon.co.uk>


If the files are on unix use cut, awk, perl to remove the unwanted fields. If they are on NT use perl, excel to remove them.

Jeff Price wrote:

> What if the data is delimited, not fixed?
>
> <klingfam_at_epix.net> wrote in message news:38867FB2.D79BA649_at_epix.net...
> > Hi,
> > If you define the actual positions of the two colums you want to include
> > you don't have to specify the third column and it won't be loaded.
> >
> > ex
> > APPEND
> > INTO TABLE Account
> > (bank_nbr POSITION(01:03) INTEGER EXTERNAL
> > ,product_type_cd POSITION(04:05) CHAR
> > ,account_nbr POSITION(06:15) INTEGER EXTERNAL
> > )
> >
> > APPEND
> > INTO TABLE Account
> > (bank_nbr POSITION(01:03) INTEGER EXTERNAL
> > ,account_nbr POSITION(06:15) INTEGER EXTERNAL
> > )
> > This shuld work fine without using temporary tables as long as you can
> > make the files fixed length.
> >
> > Bill
> >
> > Doug Dahlke wrote:
> > >
> > > If the extra fields are at the end, don't include them in the control
> file. It
> > > will load fine. If the field is in the middle, my dba loads that into a
> temp
> > > table, then copies the good fields to the correct table and then dumps
> the
> > > table. I couldn't find a 'skip field' notation in sqlldr. It will
> ignore
> > > extra data on the end past your last defined field.
> > >
> > > Doug
> > >
> > > Christoph Meyer wrote:
> > >
> > > > Hi!
> > > >
> > > > I'm trying to load a data file with each record containing 3 fields
> (col_A,
> > > > col_B, col_C) using SQL*Loader.
> > > > The table in the database, however, contains 2 fields only (field1,
> field2)
> > > > What's the syntax for the loader script to load:
> > > > col_A into field1,
> > > > col_C in field2 and
> > > > skip col_B?
> > > >
> > > > Any suggestions? Thanks in advance.
> > > > Christoph Meyer
> > > >
> > > > ---
> > > > Please remove [nospam] before replying.
Received on Wed Feb 02 2000 - 13:37:14 CET

Original text of this message