update multiple rows continue past exceptions

From: lora <anjela_pat_at_yahoo.com>
Date: Fri, 11 Dec 2009 14:41:03 -0800 (PST)
Message-ID: <f1f78fff-a80f-48ce-9718-3f86f636e9a7_at_g26g2000yqe.googlegroups.com>



Hello all,

I need to update as many rows as possible. The issue is that one row that fails causes the entire transaction to fail.

How do I get around this? I'd like to complete all UPDATE rows that don't have the exception. The below doesn't seem to work.

I'm using Oracle 10g

Thanks a bunch!

BEGIN
UPDATE MYTAB SET request = REPLACE(request, '$tpsToModify', 'tpsToModify') WHERE request like '%$tpsToModify%';  EXCEPTION
    when dup_val_on_index then

        dbms_output.put_line('DUPLICATE RECORD');

END; Received on Fri Dec 11 2009 - 16:41:03 CST

Original text of this message