Icon View Incident Report

Serious Serious
Reported By: Serge Chelli
Reported On: 6/11/2001
For: Version 2.10 Build 1
# 806 Using an Un-Optimized <= Comparison in SQL WHERE Clause Expression Causes Incorrect Results

Create a table named cust.dat with the following structure. Using the following query should produce all records, but the first one (with code blank) is missing. The problem doesn't occur if the field is not the primary index.

Structure:

code : string[8] primary index
name : string[25]

No other indexes


Put in that table this data:

code     name
-------- -------------------------
         ABCDEF
TATA     THE BIG TATA
TITI     ET GROS MINET
TOTO     THE TOTO

Use this query:

select *
from cust
where code <= "z"



Comments Comments and Workarounds
Actually the indexed (optimized) version of the results is correct. A NULL value never compares as less than or greater than any other value. The only test that can be done with NULL values is equality.


Resolution Resolution
Fixed Problem on 6/16/2001 in version 2.11 build 1
Image