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 -> Re: adding 1 to NULL = 1?

Re: adding 1 to NULL = 1?

From: Andreas Vef <avf_at_gft.de>
Date: Tue, 20 Apr 1999 12:02:54 +0200
Message-ID: <371C50CE.3B9B@gft.de>


Aaron Ogren wrote:
>
> Hans Nesbø wrote:
> >
> > Use NVL - NULL-Value Substitute.
> > The format is:
> > NVL(value, substitute)
> > If value is NULL, this function is equal to substitute
>
> Actually, I don't want to use NVL because 1+NULL=1 works
> under SQL*Server; SQL*Server does not know NVL and I
> don't want to add Oracle-specific code...Are there any
> other methods?
>
> Thanks,
> Aaron
>
> > >Using Oracle 8.0.5 for NT: Is there a way to change the
> > >Oracle handling of NULL number columns so that adding 1
> > >to a NULL value will set the value to 1 via initialization
> > >parameter or other methods, besides using the NVL function?
As far as I understand, NULL and 0 have the same meaning to your application. So you may consider to use a default value of 0 for this column, so it will not contain NULLs.

        Andreas
--


Dr. Andreas Vef                            mailto:Andreas.Vef_at_gft.de
Software-Entwicklung                       Tel: ++49/7724/9411-0
GFT Technologies AG                        Fax: ++49/7724/9411-94
Leopoldstr. 1                              http://www.gft.de 
78112 St. Georgen                          Germany
Received on Tue Apr 20 1999 - 05:02:54 CDT

Original text of this message

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