Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> RE: PL/SQL: how to let it continue when unique constraint violate d
Quite simple, dude : use an exception handler in a nested block
FOR my_row IN (SELECT blah blah) LOOP
BEGIN INSERT INTO ... VALUES(my_row.x, my_row.y, ....); EXCEPTION WHEN -1 THEN NULL; -- or do something, like print a msg WHEN OTHERS THEN ... END;
Regards,
Frederic
-----Original Message-----
From: Jeff [mailto:kit_at_cintec.cuhk.edu.hk]
Sent: 20. januar 2000 18:22
To: comp.databases.oracle.server_at_list.deja.com
Subject: PL/SQL: how to let it continue when unique constraint violated
Message from the Deja.com forum:
comp.databases.oracle.server
Your subscription is set to individual email delivery
Hi,
How to let the PL/SQL continue to run when I select some rows and insert them to another table, without quited immediately when unique constraint is violated, such that the other records can still be inserted?
Jeff
Sent via Deja.com http://www.deja.com/ Before you buy. Received on Tue Jan 25 2000 - 14:29:57 CST