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

Home -> Community -> Usenet -> c.d.o.tools -> Syntax for Constraints exceptions

Syntax for Constraints exceptions

From: <Safbaf>
Date: Sun, 22 Apr 2001 15:07:40 GMT
Message-ID: <3ae2f3a0.27674377@news.freeuk.net>

Hi

I am trying to set an exception monitoring system. If a transaction violates a
Check constraint the exception is reported in a Exceptions table

The code is ;

CREATE table exceptions(row_id rowid,

	                owner varchar2(30),
	                table_name varchar2(30),
		        constraint varchar2(30));

ALTER TABLE OneAcurr ENABLE OneAcurr_choice EXCEPTIONS INTO exceptions;

The line for the constraint is

comp_or_dept varchar2(8)
constraint OneAcurr_choice check (comp_or_dept in ('Company', 'Dept', 'Site')),

If I deliberatly violate the constraint SQL Worksheet comes up with the error

ORA-02290: check constraint (SYSTEM.ONEACURR_CHOICE) violated

but nothing appears in the Exceptions table

Any idea what I am doing wrong?

Thanks Received on Sun Apr 22 2001 - 10:07:40 CDT

Original text of this message

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