From: Thomas Kellerer on 13 Dec 2009 15:56 Kenneth Koenraadt wrote on 13.12.2009 21:14: > That's interesting : The online doc clearly states that UPDATE works > just as INSERT's regarding error logging..however, I have this simple > test case, which works with INSERT's, but not UPDATE's. The OP wanted > just that, so it may not work for him. Any thoughts ? That's in fact documented: http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9014.htm#BGBEIACB "The following conditions cause the statement to fail and roll back without invoking the error logging capability:" [...] - Any update operation UPDATE or MERGE that raises a unique constraint or index violation). I didn't see that either the first time... Thomas
From: Steve Howard on 13 Dec 2009 19:21 On Dec 12, 1:41 am, Mladen Gogala <gogala.mla...(a)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.
From: jimmyb on 14 Dec 2009 00:53 On Dec 13, 4:21 pm, Steve Howard <stevedhow...(a)gmail.com> wrote: > On Dec 12, 1:41 am, Mladen Gogala <gogala.mla...(a)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.
From: Mladen Gogala on 14 Dec 2009 12:45 On Sun, 13 Dec 2009 21:53:54 -0800, jimmyb wrote: > They used to do an UPDATE when an exception was raised? That should be a > bad coding practice in every shop, JMO. Why is that? -- http://mgogala.byethost5.com
From: Shakespeare on 14 Dec 2009 13:39 jimmyb schreef: > On Dec 13, 4:21 pm, Steve Howard <stevedhow...(a)gmail.com> wrote: >> On Dec 12, 1:41 am, Mladen Gogala <gogala.mla...(a)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
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Optimizer 10053 trace file, strange choises made by Oracle?? Next: Compression |