This is the way it's supposed to work. Basically, null means "I don't know what the value
is". Since the value is unknown, it might = 'A' or it might not. Because of that, the
query returns only those rows for which fld1 has a non-null value that is not equal to 'A'.
For further information, check out C.J. Date's _A Guide to the SQL Standard_ or his
_Relational Database: Selected Writings_.
Mark Collins
mcollins@us.dhl.com
The problem lies in how easily and dangerously we forget that
manipulating things is not the same as understanding them.
------------------------
From: "Pinto, Raymond" <PINTOR@valuerx.com>
Subject: Select Statement Q!!!
Date: Tue, 3 Mar 1998 17:17:41 -0600
To: "'informix-list@iiug.org'" <informix-list@iiug.org>
Q. I have a query
select count(*) from table_a
where fld1 != 'A'
I get a count = 7000
fld1 is char(1)
There are 100000 records with fld1 = null
This query does not count the null values
>From what I can see , Informix does not count the null values. Is this a
bug or is this the way it is supposed to work
Thanks in advance
Raymond Pinto
pinto@valuerx.com
---------------End of Original Message-----------------