Re: SQL Loader: How to skip fields?

From: <klingfam_at_epix.net>
Date: Thu, 20 Jan 2000 03:27:04 GMT
Message-ID: <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 Thu Jan 20 2000 - 04:27:04 CET

Original text of this message