Re: Query Help

From: shakespeare <whatsin_at_xs4all.nl>
Date: Thu, 17 Jan 2008 14:17:45 +0100
Message-ID: <478f5578$0$85789$e4fe514c@news.xs4all.nl>

"Doug Miller" <spambait_at_milmac.com> schreef in bericht news:smIjj.261$nK5.202_at_nlpi069.nbdc.sbc.com...
> In article
> <1c892130-538b-49bd-a6dc-b098222ee311_at_x69g2000hsx.googlegroups.com>,
> 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
> in
> either form, the second clause won't even be evaluated (due to the
> conjunction).
>
> --
> Regards,
> 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..
So
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

Original text of this message