IMHO, a better solution is to load all the update file to the new table
and after that make the loop.
--
Alexander I.Doroshko, aid_at_grant.kharkov.ua
- Bank "Grant", Kharkov, Ukraine
Paul Q <paulq_at_home.com> wrote in article
<Vt0s3.843$C6.7728_at_news2.rdc1.on.home.com>...
:
: Easily,
: load the data from the bad file into a another table same structure
as the
: first
: then loop through it delete the records from the first table , the
insert
: the records
: from the new table into the old table..
:
: Note: Are you sure you want do this.
: For example, not all records that appear in the bad file may be
caused by
: duplicate keys, what about missing mandatory fields. In this case you
would
: not want to delete the original.
:
: Bob McConnell wrote in message <37B08436.E021A4F_at_mci.com>...
: >I have a table with > 1M records. Several time a day I insert new
: >records from an update file using SQLLOAD. Many of the new records
have
: >the same primary key as exists in the table and therefore fail due
to
: >constraints.
: >I would like to take the "BAD" file from the SQLLOAD and delete
those
: >records from the table with matching keys and then insert the
records
: >from the "BAD" file. How could this be done?
Received on Wed Aug 11 1999 - 03:22:14 CDT