Re: Overwriting existing data with sqlloader

From: GHouck <hksys_at_teleport.com>
Date: Sun, 03 Oct 1999 01:12:16 -0700
Message-ID: <37F70FE0.20DE_at_teleport.com>


David Van Zandt wrote:
>
> Not that we've found, at any rate. My workaround is to upload into a
> "temporary" table, then add a SQL UPDATE script to replace old rows from
> the intermediate source.
>
> HTH,
> Dave
>
> Default wrote:
> >
> > I am try to use a cron job to load a table via sqlloader. Is there any
> > way to overwrite the entire existing data with the new data.
> >
> > The loader control file is as follows .
> >
> > LOAD DATA
> > INFILE 'bosscust.dat'
> > INTO TABLE cust_country
> > (customer_number POSITION(01:6) ,
> > customer_desc POSITION(19:48),
> > country_code POSITION(189:197) )
> >
> > regards,
> > Alan Slattery

Default:

You should be able to use the REPLACE option:



load data
infile 'index.dbs'
REPLACE
into table dgn_shape
fields terminated by '~' optionally enclosed by "'" trailing nullcols

Yours,

Geoff Houck
systems hk
hksys_at_teleport.com
http://www.teleport.com/~hksys Received on Sun Oct 03 1999 - 10:12:16 CEST

Original text of this message