Re: How to count NULL columns?
Posted in 1996
Frederic Bouquet wrote:
>
> I tried the following command :
> select count(*) from table where mou_codlet not between "AAA" and "ZZZ">
> but the result returned is not the same as the following sql command
> select count(*) from table where mou_codlet not between "AAA" and "ZZZ" or> mou_codlet is null
>
> Is it normal that the null values are not included in the result of the first
> sql command ?
Yes. NULL is "not known", so any equality, etc comparison to it has to be
specific, like your 2nd version is.
>
> ---------------------
> Frederic BOUQUET
> fbouquet@cornut.fr
--
//////////////// =======================================================
////////// // Dennis J. Pimple Informix Software, Inc.
////// / /// Principal Consultant 5299 DTC Blvd Suite 740
///// // //// dennisp@informix.com Englewood CO 80111
//// // /////
/// // ////// recept: 303-850-0210
// // /////// direct: 303-740-5611 Opinions expressed are mine,
/ /////////// fax: 303-843-6408 and do not necessarily
//////////////// http://www.informix.com reflect those of my employer