| 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 |
|
| 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
|