Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: help!! problem in update, replace null with empty string ''

Re: help!! problem in update, replace null with empty string ''

From: <rtproffitt_at_my-deja.com>
Date: Tue, 14 Dec 1999 16:49:32 GMT
Message-ID: <835sep$aan$1@nnrp1.deja.com>


Frank,

Oracle does not distinguish between Empty strings and NULL, like others languages such as Foxpro, where NULL string and empty string are different.

Two quotes together is the symbol for 'literal quote'. Thus, x := '' is not valid, and x := ''' is not legal, and x := '''' is saying assign a string with a literal quote to x.

Selecting LENGTH on the null string will also return NULL. If you wish to test for length=0 then you will need something like:

    select nvl(lengthb(x),0) from xxx;
Returns a 0 on the null string.

I did have a circumstance once where the program was not written to distinguish
two different "kinds" of empty for an edit box: 1) where no record exists for the row and 2) where the record exists but the text is empty..... but this was a design issue in the code and not a problem with Oracle...

Robert Proffitt
Beckman Coulter

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Dec 14 1999 - 10:49:32 CST

Original text of this message

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