Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Update Select Statement Error - Catch rowid..

Update Select Statement Error - Catch rowid..

From: paul <pquigley_at_whpi.com>
Date: 16 Aug 2002 19:50:54 -0700
Message-ID: <98da33ef.0208161850.3de589f5@posting.google.com>


Hello All,

I have an update select statement which executes inside a pl/sql block and uses a cursor/fetch to update 1 row at a time and skip rows which result in exceptions.

Running the sql in sql*plus takes around 30 secs per 15,000 rows, but considerably longer when using the cursor/fetch.

I need the exception handling as the pl/sql proc is used in a nightly batch-update via OO4O.

I am trying to find of way to use just straight sql, but with some exception-handling - running the straight sql, capturing the rowid of a failed rec, do not include this row for update, then run again - continue until no exceptions.

e.g.

Proc sql_proc IS

[Update Statement]

End sql_proc;

Function run_sql RETURN BOOLEAN IS

[Call sql_proc]
   

   Exception
[Get rowid of failed record - remove row from update - try sql
again]

Pointers appreciated Received on Fri Aug 16 2002 - 21:50:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US