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 -> Check Constraint Problem

Check Constraint Problem

From: Peter C. <pcugier_at_my-dejanews.com>
Date: Thu, 06 May 1999 07:20:35 GMT
Message-ID: <7grfs0$7qh$1@nnrp1.deja.com>


I have an interesting phenomenon on an Oracle 7.3.4.3 database.

A table has the following check constraint defined

Constraint Name: SYS_C006174
Seach Condition: "CHECK(columnA IN(1, 2, 3))"

and the constraint is enabled.

A select dictinct on columnA retrieves the following values

ColumnA


        0

??????

When I disable the constraint and try to enable it afterwards I get the following:

SQL> alter table article_group disable constraint sys_c006174;

Table altered.

SQL> alter table article_group enable constraint sys_c006174; alter table article_group enable constraint sys_c006174 *
ERROR at line 1:
ORA-02293: cannot enable (OPS$STOREP.SYS_C006174) - check constraint violated

Does someone has an idea how the invalid value got into the column and why it is possible that the constraint was enabled in the first place?

No direct load was done on the database.

Peter

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu May 06 1999 - 02:20:35 CDT

Original text of this message

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