Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: substituting a space for a NULL
use the default option :
col1 varchar2 not null default ' '
all subsequent inserts will put a spce in the column if the statement does
not
reference the column.
Neil Cudd.
kevon_at_my-dejanews.com wrote in message <7bosue$pdo$1_at_nnrp1.dejanews.com>...
>I'm a SQL novice, so forgive me if the answer to this is obvious.
>
>I'd like to define a table such that for all columns when you try to insert
a
>NULL into a NON NULL column, instead of producing an error, it instead
>inserts a blank (' ').
>
>My reason for doing this is that I am using some software loading data into
>Oracle that I believe is trimming spaces from strings such that ' ' becomes
''
>which is interpreted by Oracle as a NULL value.
>
>Thanks in advance,
>
>Kevon
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Fri Mar 05 1999 - 10:52:16 CST
![]() |
![]() |