Re: Null data in not null column

From: <howard.latham_at_gmail.com>
Date: Tue, 15 Apr 2014 18:11:42 +0100
Message-ID: <534d684f.c15a0f0a.26e6.2689_at_mx.google.com>



Set it to ""
  • Reply message ----- From: "Ingrid Voigt" <giantpanda_at_gmx.net> To: "oracle-l_at_freelists.org" <oracle-l_at_freelists.org> Subject: Null data in not null column Date: Tue, Apr 15, 2014 4:53 PM

Hi,

one of our customers' databases has a table with a not null column containing empty data. Do you know how this can be set up?

I need to copy the table (via exp/imp) and hit either ORA-01400 (when defining not null before insert) or ORA-02296 (when I insert first and later modify the column).

More details:

Windows 2008 R2
Oracle 11.2.0.3 + Patch 27 (January 2014)

Table definition (more columns left out):

CREATE TABLE USR_USER
(

OID           NUMBER(15)                      NOT NULL,
ANZEIGE_NAME  VARCHAR2(40 BYTE)               DEFAULT ''                    NOT NULL,
)
TABLESPACE USERS; And the data:

> select oid, anzeige_name, '.'||anzeige_name||'.' from usr_user;

OID ANZEIGE_NAME                             LENGTH(ANZEIGE_NAME)
---------- ---------------------------------------- --------------------
223
224
(more rows left out)

These are not strings consisting of spaces, but really empty ones, i.e. nulls.

Insert into the table without specifying anzeige_name also hits ORA-01400, the condition is active. The corresponding check constraint is enabled and validated.

I'd appreciate help in reproducing this.

Thank you.
Ingrid Voigt

--
http://www.freelists.org/webpage/oracle-l

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Apr 15 2014 - 19:11:42 CEST

Original text of this message