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

From: Scott Mattes <Scott_at_TheMattesFamily.ws>
Date: Thu, 15 May 2003 15:54:55 GMT
Message-ID: <jLOwa.482$793.531127_at_news1.news.adelphia.net>


at least in our Oracle 8 an update does not throw an exception, which is why [Quoted] I suggested trying the insert first (after making the index and I should have specified a unique index i guess)

"Robert Dimitrovski" <robert.dimitrovski_at_ht.hr> wrote in message news:1053006903.395782_at_tuxri2.tkcrij.ht.hr...
> Example:
>
> update table
> set column=variable
> where
> ;
> exception
>
> when no_data_found then
>
> tablica:='CELL_PAR_VARS CELL_CS';
>
> insert into Table
> (columns )
> values (
> );
>
> end;
>
>
>
> "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 - 17:54:55 CEST

Original text of this message