Re: NULLS with ORACLE
Date: 1995/08/03
Message-ID: <3vp7fe$ip7_at_ixnews7.ix.netcom.com>#1/1
In <3vkedi$ic7_at_raffles.technet.sg> apxafoo_at_technet.sg (Anthony Foo)
writes:
>
>
>Wonder if anyone can help me. I am currently writing an application
>in PB4.0 that is accessing the Oracle database (ver 7.0) on my
company's
>AIX machine.
>
>The tables in the database are defined such that all columns are set
with
>NOT NULL constraint. However, when I create a datawindow that has,
say, 5
>columns out of 15 columns in a table and I do a insertrow and then an
update,
>Oracle return with the error that there are null values in the insert
>statement. What actually happened was that PB 4.0 send an insert
statement with
>only the 5 columns in the datawindow. The remaining 10 columns that
were not
>passed, Oracle tried writing nulls into them, thus the error.
>
>I had tried altering the table with the column set as NOT NULL DEFAULT
SPACES
>but Oracle return telling me I can't set the column as such. It's
either I set
>the column as NOT NULL or I accept NULL with default.
>
>Question is, is there anyway I can overcome this problem without
altering
>the columns' NOT NULL constraint? I had thought of a possibility which
is
>to select all the columns in the table even if I only needed 5 out of
15
>columns in the datawindow. I DON'T wish to use this solution as it
means
>nightmare doing maintenance and delay in retrieval.
>
>Appreciate any help or advice given.
>
>Thanks
Hi. This may be an obvious question, but have you tried using the NVL function? This basically says, when you select a column, if the value returned is NULL, then substitute some other given value for it. I'm not sure it would work with your problem, but it's worth a try if you haven't.
Good luck!
Jennifer Blair
Blair Technical Training
jblair_at_ix.netcom.com
Received on Thu Aug 03 1995 - 00:00:00 CEST