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: selecting a NULL value?????

Re: selecting a NULL value?????

From: <mpir_at_compuserve.com>
Date: Tue, 25 Aug 1998 14:54:15 GMT
Message-ID: <6ruj6o$38j$1@nnrp1.dejanews.com>


If your '' represents a zero length string, it might be that you have spaces in the field(s). A zero length string is different from a null string in the database. Zero length means no value, null means unknown value. Space(s) are values.

Try a select count(*) for char_field is null or select count(*) from length(ltrim(Rtrim(char_field)))<1;

See what the number of rows are.

In article <6rt0lg$q06$1_at_corpnews1.Corp.Sun.COM>,   gunjeet_at_sunsparkle.corp.sun.com wrote:
> Try :
>
> SELECT *
> FROM this_table
> WHERE (char_field = ''
> OR char_field IS NULL)
> ^^^
>
> NULL indicates the absence of a value.
>
> Hope this helps.
>
> Gunjeet
>
> In article 44641140_at_news.concentric.net, lkolinek_at_concentric.net (larryk)
writes:
> > Hello...
> >
> > Here is a select statement:
> >
> > SELECT *
> > FROM this_table
> > WHERE (char_field = ''
> > OR char_field = null )
> >
> >
> > this_table.char_field contains nothing. Why does this SQL statement
> > not work?
> >
> > thanks in advance
> > larry
>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Tue Aug 25 1998 - 09:54:15 CDT

Original text of this message

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