Re: sql question...
From: Alex Heney <HENEYA_at_ENTCF3XSPAM.agw.bt.co.uk>
Date: 1997/06/13
Message-ID: <33a10316.5861578_at_news.axion.bt.co.uk>#1/1
Date: 1997/06/13
Message-ID: <33a10316.5861578_at_news.axion.bt.co.uk>#1/1
[Quoted] On Thu, 12 Jun 1997 15:22:59 -0400, oispeggy_at_acsu.buffalo.edu wrote:
>
>Learn something new every day....
>
>1.
>select lname, fname This returns everyone with 'N' or 'G' or ' '.
>from resdemo None with 'Y'. None with null.
>where fellow != 'Y'
>
<snip>
>
>
>What surprised me is that #1 did not return anyone with a null value?
>I thought it would? Why didn't it?
>
Basically, NULL values are ignored in any test using comparison operators (=, !=, >, <, etc.). In order to cater for NULL values, you either have to wrap NVL around the item, or explicitly use the IS (NOT) NULL operator.
-- The above posting represents the personal opinions of the author and is not to be taken as official (or unofficial) policy or opinions of his employer. Remove XSPAM from mail_id if replying via email. Alex Heney, Living in the Global Village.Received on Fri Jun 13 1997 - 00:00:00 CEST