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: IS NULL on empty varChar2

Re: IS NULL on empty varChar2

From: dbyy <noname_at_fooled.com>
Date: Wed, 27 Oct 2004 03:02:53 GMT
Message-ID: <Xns958EEABCC281Cdbyyatcanadadotcomni@207.35.177.134>


Mark Townsend <markbtownsend_at_comcast.net> wrote in news:5kDfd.12962$R05.12388_at_attbi_s53:

> dbyy wrote:

>> 
>> on a IF statement as follow
>> 
>> 1) The attribute Col1 is an empty string <''>
>> 2) on the statement (in PL/SQL/trigger) <IF TRIM(Col1) IS NULL>
>> it returns TRUE.
>> 
>> IMHO, In this case, Col1 can't be NULL, it should be a (empty)
>> string. 
>> 

>
> Fred - welcome to Oracle. This is an Oracle oddity - basically, we
> treat zero length strings as NULLs (and a empty string becomes a zero
> length string depending on the data type) - see
> http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:5984
> 520277372 for a description.
>
>
>

Thanks Mark,
that was very helpful.
Fred Received on Tue Oct 26 2004 - 22:02:53 CDT

Original text of this message

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