Xref: alice comp.databases.oracle.tools:39436
Path: alice!news-feed.fnsi.net!newsfeed.icl.net!dispose.news.demon.net!demon!news.demon.co.uk!demon!maderich.demon.co.uk!anonymous
From: Stuart Turton <sturton@maderich.demon.co.uk>
Newsgroups: comp.databases.oracle.tools
Subject: Re: SQL Loader: How to skip fields?
Date: Wed, 02 Feb 2000 12:37:14 +0000
Organization: Maderich Limited
Message-ID: <389824F9.ED747AB3@maderich.demon.co.uk>
References: <86514q$1maj$1@news.nikoma.de> <38864E9F.17F5A4A7@shieldsbag.com> <38867FB2.D79BA649@epix.net> <86smk1$q8s$1@charm.magnus.acs.ohio-state.edu>
X-Trace: news.demon.co.uk 949500931 nnrp-07:16136 NO-IDENT maderich.demon.co.uk:158.152.222.50
X-Complaints-To: abuse@demon.net
To: comp.databases.oracle.tools
X-Mailer: Mozilla 4.7 [en-gb] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 64

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@epix.net> wrote in message news:38867FB2.D79BA649@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.

