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: VARCHAR2: compare problem

Re: VARCHAR2: compare problem

From: Vladimir M. Zakharychev <bob_at_dpsp-yes.com>
Date: Mon, 13 May 2002 14:30:01 +0400
Message-ID: <abo4j7$gc$1@babylon.agtel.net>


This is a FAQ: in Oracle, '' (empty string) is NULL and should be worked with as such.

-- 
Vladimir Zakharychev (bob@dpsp-yes.com)                http://www.dpsp-yes.com
Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications.
All opinions are mine and do not necessarily go in line with those of my employer.


"Alexander Lang" <lang_at_mueritz-comp.de> wrote in message news:3CDF8D5C.5F3FEFA8_at_mueritz-comp.de...

> Hi NG,
>
> I use Oracle 8i.
> I have a table with a field of type VARCHAR2(8), say A.
>
> When I use the query SELECT * FROM table WHERE A <> 'foo'
> I get a lot of records.
> The contents of field A is not NULL and not empty ('').
>
> When I try the query SELECT * FROM table WHERE A <> ''
> I get no records. But there are many records where A is not empty.
>
>
> Can anyone please help me?
>
> Thanks,
> Alexander Lang
Received on Mon May 13 2002 - 05:30:01 CDT

Original text of this message

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