Re: Query Help
Date: Thu, 17 Jan 2008 14:17:45 +0100
"Doug Miller" <spambait_at_milmac.com> schreef in bericht
> In article
> Charles Hooper <hooperc2000_at_yahoo.com> wrote:
>>Just a minor correction to my previous post... additional thoughts
>>shortly after submitting the previous post. These two logic checks
>>are not necessarily equivalent when dealing with data stored in a
>>database, but are equivalent when dealing only with Boolean logic:
>>IF (AGE <> 65) OR (AGE = 65 AND RETIRED = "Y") THEN
>>IF (AGE <> 65) OR (RETIRED = "Y") THEN
>>The first expression does not permit NULL values for the AGE, while
>>the second does.
> I disagree: if AGE is NULL, then the first clause (AGE <> 65) is true, and
> either form, the second clause won't even be evaluated (due to the
> Doug Miller (alphageek at milmac dot com)
> It's time to throw all their damned tea in the harbor again.
Comparing with NULL is always false..
65 <> NULL evaluates to false
65 = NULL evaluates to false
unless IS NULL is used.
So AGE <> 65 evaluates to false if AGE is null
Shakespeare Received on Thu Jan 17 2008 - 07:17:45 CST