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 -> Pro*C: howto to insert space non null value

Pro*C: howto to insert space non null value

From: <malloth_at_my-deja.com>
Date: Thu, 23 Dec 1999 15:42:01 GMT
Message-ID: <83tfr1$jk9$1@nnrp1.deja.com>


Hi there,

We have an attribut of type CHAR(1) which is defined as NOT NULL.
When trying inserting a value of ' ' (in other words a space) the system gives the ORA-01400 error saying that one have tried to insert a null value. I suppose that the space character is trimmed before being inserted and as it is the only character the empty string remains to insert which is actually interpreted as a null value.

Is there any way to insert the space value by letting the definition of the attribut remain to CHAR(1) NOT NULL?

One way would be to use NVL, but perhaps there are other possibilities.

Thanks in advance for any answer preferably directly to my e-mail adress.

Christoph Malloth
--
malloth_at_freesurf.ch

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Dec 23 1999 - 09:42:01 CST

Original text of this message

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