LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: sas-l@uga.edu
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


Back to: Top of message | Previous page | Main SAS-L page