Re: update multiple rows continue past exceptions
From: Shakespeare <whatsin_at_xs4all.nl>
Date: Mon, 14 Dec 2009 19:39:16 +0100
Message-ID: <4b26864d$0$22933$e4fe514c_at_news.xs4all.nl>
jimmyb schreef:
> On Dec 13, 4:21 pm, Steve Howard <stevedhow..._at_gmail.com> wrote:
>
> They used to do an UPDATE when an exception was raised? That should be
> a bad coding practice in every shop, JMO.
Date: Mon, 14 Dec 2009 19:39:16 +0100
Message-ID: <4b26864d$0$22933$e4fe514c_at_news.xs4all.nl>
jimmyb schreef:
> On Dec 13, 4:21 pm, Steve Howard <stevedhow..._at_gmail.com> wrote:
>> On Dec 12, 1:41 am, Mladen Gogala <gogala.mla..._at_gmail.com> wrote: >> >> >> >>> Why not simply use the merge statement? >>> --http://mgogala.byethost5.com >> This is a regular event in our shop. Our developers used to try to >> insert, and then handle the exception if it existed and update it. We >> cut our redo by a large factor when we asked them to switch to MERGE.
>
> They used to do an UPDATE when an exception was raised? That should be
> a bad coding practice in every shop, JMO.
Not if the exception is a dup-val-on-index. Its a practice seen all around!
Shakespeare Received on Mon Dec 14 2009 - 12:39:16 CST