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: Mark Townsend <markbtownsend_at_comcast.net>
Date: Wed, 27 Oct 2004 02:01:42 GMT
Message-ID: <5kDfd.12962$R05.12388@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:5984520277372 for a description. Received on Tue Oct 26 2004 - 21:01:42 CDT

Original text of this message

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