Re: Wait event SQL*Net break/reset to client caused by duplicate insert?

  • From: Nigel Thomas <nigel_cl_thomas@xxxxxxxxx>
  • To: pjhoraclel@xxxxxxxxx
  • Date: Thu, 10 Apr 2008 04:45:54 -0700 (PDT)

--- On Thu, 4/10/08, Peter Hitchman <pjhoraclel@xxxxxxxxx> wrote:

> From: Peter Hitchman <pjhoraclel@xxxxxxxxx>
> I
> suggested a change to first update and then insert if no
> row is updated. I
> also considered using merge, but I thought that it might
> not be supported by
> the jdbc driver and time pressure means we do not have the
> time to find out.

Peter

If you don't want to try MERGE, you could always make an anonymous PL/SQL block 
(which is certainly supported by PL/SQL) and so handle the insert-else-update 
(or update-else-insert - whichever is the best tradeoff) in one SQL round trip 
from application server to database; then there will never need to be an 
exception raised to (and handled by) JDBC.

Cheers Nigel


--
//www.freelists.org/webpage/oracle-l


Other related posts: