Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Overwriting existing data with sqlloader

1,582 views
Skip to first unread message

Default

unread,
Oct 1, 1999, 3:00:00 AM10/1/99
to
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

Mark G

unread,
Oct 1, 1999, 3:00:00 AM10/1/99
to
SQL*Loader assumes tha the file is empty (insert into clause) or its to be
appended to (append into clause). If you don't specify a clause, as you
haven't, it defaults to insert into.

Why not set up your cron to run a script, removing all data in table first
before kicking off SQL*Loader?

M

Default <alan_slattery.d...@nt.com> wrote in message
news:37F4B22C...@nt.com...

David Van Zandt

unread,
Oct 2, 1999, 3:00:00 AM10/2/99
to
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

GHouck

unread,
Oct 3, 1999, 3:00:00 AM10/3/99
to

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
hk...@teleport.com
http://www.teleport.com/~hksys

0 new messages