Re: PL/SQL Update and Insert into Table using a lookup

From: Scott Mattes <Scott_at_TheMattesFamily.ws>
Date: Thu, 15 May 2003 11:25:46 GMT
Message-ID: <_OKwa.415$793.451637_at_news1.news.adelphia.net>


First, create an index.

Second, insert data

Third, code an exception handler for record already existing

Fourth, update data in the handler

Or,

First, create an index

Second, select count of record you are working with

Third, if 0 insert, else update

"Mark Regan" <mark.regan_at_bskyb.com> wrote in message news:c00c1cf6.0305150210.290ce007_at_posting.google.com...
> Hi,
>
> I am relatively new to PL/SQL and am trying to create a script that
> will update a table with new records from another table or insert the
> record if no record currently exists. The records contain a unique
> identifier that will be used to check if the record already exists on
> the table.
>
> However the unique identifier does not have an index built on it on
> this table.
>
> Any ideas how I would write this?
>
> Thanks
Received on Thu May 15 2003 - 13:25:46 CEST

Original text of this message