ChrisCarroll
Programmer
- Oct 10, 2000
- 177
Any takers for the following puzzle, which is a simplified version of a query that returns the wrong answer:
Run this from the command line:
Are we blind, or is it really, simply wrong??
Chris [sig][/sig]
Run this from the command line:
Code:
set date british
create table err (datedied D, retdate D)
insert into err values ({}, {11/01/1999})
select * from err where ;
( (datedied>{1/7/1999} or datedied={}) and ;
(retdate >{1/7/1999} or retdate ={}) )
&& --> Correctly returns zero records
select * from err where ;
( (datedied>{1/7/1999} or datedied={}) and ;
(retdate >{1/7/1999} or retdate ={}) ) or .F.
&&--> InCorrectly returns 1 record
Are we blind, or is it really, simply wrong??
Chris [sig][/sig]