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

Home -> Community -> Usenet -> c.d.o.misc -> Which rows broke my constraint?

Which rows broke my constraint?

From: Lee Pollington <lee_at_cursci.co.uk>
Date: Tue, 18 Aug 1998 12:43:24 +0100
Message-ID: <35D968DC.24E44C05@cursci.co.uk>


Hi,

I want to know if Oracle keeps the RowID's or something of rows that break a unique index. I have a table which has a unique index across 3 columns: a foreign key and two number columns. If the uniqueness of this index is broken by an insertion/update to this table an exception is raised as a duplicate value on an index. I want to be able to find out from Oracle which rows conflicted with the update/insertion.

I thought that Oracle might do something like this as I saw in the docs that you can add an 'exceptions into EXCEPTIONS' clause to an enable constraint command, which puts the RowID's of the rows that broke the constraint.

I thought that maybe there would be a cursor passed into a trigger PL/SQL
block, but have not been able to find anything.

Any help will be much appreciated.
thanks
Lee Pollington
email: lee_at_biomednet.com Received on Tue Aug 18 1998 - 06:43:24 CDT

Original text of this message

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