Re: SQL*Loader question

From: Chuck Hamilton <chuckh_at_dvol.com>
Date: 1996/04/22
Message-ID: <317b8f0b.5464598_at_news2.ios.com>#1/1


srijay_at_ix.netcom.com(Srikanth Narasimhan) wrote:

>What options will I use in SQL*Loader to insert a set of records into a
>table if those records are not already present and update the records
>on the table if the records are already present in the table?
>
>Any info will be most appreciated. Thanks in advance
>
>Srikanth
>

If you discover a way to update existing records with sqlload I'd like to hear about it. I couldn't find any such option. We just completed a project with the same requirement and this is how we got around it.

  1. Create a delta table that's identical to the main table you want to update. (CREATE TABLE delta AS SELECT * FROM main WHERE 0 = 1).
  2. sqlload itno the delta table.
  3. Delete from the main table anything that also exists in the delta table.
  4. Insert all rows from the delta table into the main table. -- Chuck Hamilton chuckh_at_dvol.com

Never share a foxhole with anyone braver than yourself! Received on Mon Apr 22 1996 - 00:00:00 CEST

Original text of this message