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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Character Equality

Re: Character Equality

From: Eric Givler <egivler_at_flash.net>
Date: Tue, 12 Sep 2000 17:24:50 GMT
Message-ID: <CFtv5.5324$oc3.285850@news.flash.net>

The first query is saying: where test != null If you want to test for this, you should write: where test is not null

Caffeine <danny_milne_at_yahoo.co.uk> wrote in message news:8pln62$sim$1_at_nnrp1.deja.com...
> Hi there,
> Just wondering if any one can explain to me why the following
> statement returns no rows.
>
> select test from tmp4 where test != '';
>
> The table contains...
>
> SQL> select * from tmp4;
>
> TEST
> ----------
> HELLO
> Hello
> hello
>
> The table is described as...
>
> SQL> desc tmp4;
> Name Null? Type
> ----------------------------------------- ----------------------------
> TEST VARCHAR2(10)
>
> And the results of a similar query. (Looking for NOT a single space)
> SQL> select test from tmp4 where test != ' ';
>
> TEST
> ----------
> HELLO
> Hello
> hello
>
> I'm running Oracle 8.1.6 on RH Linux 6.1 and I'm stumped. Any ideas?
> Thanks for your time...
>
> Dan
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Sep 12 2000 - 12:24:50 CDT

Original text of this message

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