
SQL not returning proper results
Hi,
I have a table, ORGANIZATION, that is partially defined as:
Organization_Nbr BIGINT NOT NULL (PK),
Organization_Type_Code VARCHAR(10) (FK)
There are approximately 2800 rows in this table. 53 of the rows have an
Organization_Type_Code of '001', 14 rows have an Organization_Type_Code of
'014'. The rest of the type codes are currently NULL.
I issued an SQL statement of
"SELECT Organization_Nbr
from ORGANIZATION
WHERE Organization_Type_Code <> '001';
My expected results are every row that does not have a type code of '001'.
Instead, I get the 14 rows with a type code of '014' and no rows where the
type code is NULL.
This particular query was performing as expected approximately 2 weeks ago
and, to my knowledge, nothing has changed with the configuration of the
database. I have run this from the command center and through the command
line with the same results.
The version of DB2 is 7.2 running fixpack 5 on Redhat Linux installed on a
Dell server.
Any ideas as to what may be wrong/what I could try to diagnose and fix would
be greatly appreciated.
Thank you.