Re: SQL question
Date: Tue, 28 Dec 93 07:47:04 EST
Message-ID: <2fp9u2$hbj_at_reeve.research.aa.wl.com>
> From: davidmo_at_rossinc.com (David Moore)
> I performed the following queries, searching for blank character fields:
>
> SQL> select count(*) from table_one where field_one = '';
>
> COUNT(*)
> ----------
> 0
>
> SQL> select count(*) from table_one where field_one = ' ';
>
> COUNT(*)
> ----------
> 21
>
>
> Can someone explain to me why the first query does not work and the
> second one does??
>
> Thanks,
>
> Dave
> --
> =============================================================
> David A. Moore | Phone: (415) 593-2500
> Ross Systems Inc. | E-mail: davidmo_at_rossinc.com
The obvious answer is that you have stored a single blank space in field_one and not a null value. To verify try:
update table_one set field_one = null where field_one = ' ';
then retry your queries.
Hope this helps.
Matteo diTommaso
ditommm_at_aa.wl.com
Received on Tue Dec 28 1993 - 13:47:04 CET