Date: Sun, 15 Mar 2009 20:39:31 -0700
Reply-To: Richard <rdevenezia@WILDBLUE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Richard <rdevenezia@WILDBLUE.NET>
Organization: http://groups.google.com
Subject: Re: difference in Null and 1 and < 1
Content-Type: text/plain; charset=ISO-8859-1
On Mar 15, 11:02 pm, "data _full_" <data_f...@more.hn> wrote:
> assuming a table contains a numeric value called _value_ defined as either NULL or 1
>
> proc sql; create table test1 from da_table where _value_ is NULL; quit;
>
> the above reliably returns all values that are the opposite of
>
> proc sql; create table test1 from da_table where _value_ = 1; quit;
>
> what I can not quite understand is, what is the difference with this code
>
> proc sql; create table test1 from da_table where _value_ < 1; quit;
>
> running the above (_value_ < 1) does not return same number of rows as (_value_ is
> NULL)
>
> why is this so?
A NULL value when used in a calculation yields an undefined result.
Undefined results cause a row to be invalid for inclusion in the
subsetting select.
-
Richard A. DeVenezia
http://www.devenezia.com
|