How to use sqlload and skip columns?


Using sqlload, is it possible to skip certain columns? I.e. the source
data containts multiple columns that I don't want to insert into a
column in the database. I can't seem to find this anywhere in the
documentation.

This is my control-file:

load data
infile *
into table TESTTABLE
fields terminated by ',' optionally enclosed by '"'
(
    COLUMN1,
    -- skip column from source here
    COLUMN2,
    COLUMN3
)

BEGINDATA
"1","skip this","2","3"



Yes you can, but you will have to give it the column numbers and the data
type such as:

(
     COLUMN1  position( 1:1) char,
     COLUMN2  position(18:18) char,
     COLUMN3  position(22:22) char,
     COLUMN4  position(32:37)date  'MMDDRR'
)
 
 
 

Hosted by www.Geocities.ws

1