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 (June 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 20 Jun 2006 16:57:49 -0700
Reply-To:   "Hill, Andrew" <hill.ad@GHC.ORG>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Hill, Andrew" <hill.ad@GHC.ORG>
Subject:   Re: WHERE clause and SUM(of ...) function
Comments:   To: "Nordlund, Dan (DSHS)" <NordlDJ@DSHS.WA.GOV>
Content-Type:   text/plain; charset="us-ascii"

This does not work because a WHERE clause needs to use data already in the data set, that is it reads the data that are already in existance before the datastep processing starts. In contrast an If statement used data this is created in the datastep processing. So you can use sum(of x1-x6) in an IF but not a WHERE.

Andrew

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Nordlund, Dan (DSHS) Sent: Tuesday, June 20, 2006 2:32 PM To: SAS-L@LISTSERV.UGA.EDU Subject: WHERE clause and SUM(of ...) function

SAS-L,

Is it possible to use of SUM(of x1-x6) in a where clause? When a co-worker tried doing this he got a syntax error message. This works ok in a sub-setting IF statement but apparently not in a WHERE clause. Is this something that is discussed in the online docs that I have just missed? Enquiring minds want to know. :-)

Thanks,

Dan

Daniel J. Nordlund Research Investigator Research and Data Analysis Washington State Department of Social and Health Services Olympia, WA 98504-5204


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