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 (September 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 21 Sep 2010 09:32:04 -0500
Reply-To:   "Data _null_;" <iebupdte@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Data _null_;" <iebupdte@GMAIL.COM>
Subject:   Re: SAME-AND operator in Data Step
Comments:   To: "Viel, Kevin" <kviel@sjha.org>
In-Reply-To:   <AANLkTik6STazPGNdfEPTDAFp4Ew0oKNLTCFV_mf0_s_z@mail.gmail.com>
Content-Type:   text/plain; charset=ISO-8859-1

It can also be written WHERE ALSO but I can find the documentation except a referene to WHERE ALSO window in PROC REPORT.

131 proc print data=sashelp.class; 132 where sex eq 'M'; 133 where also name like 'J%'; NOTE: WHERE clause has been augmented. 134 run;

NOTE: There were 3 observations read from the data set SASHELP.CLASS. WHERE (sex='M') and name like 'J%'; NOTE: PROCEDURE PRINT used (Total process time): real time 0.01 seconds cpu time 0.01 seconds

135 136 proc print data=sashelp.class; 137 where sex eq 'M'; 138 where same and name like 'J%'; NOTE: WHERE clause has been augmented. 139 run;

NOTE: There were 3 observations read from the data set SASHELP.CLASS. WHERE (sex='M') and name like 'J%';

On Tue, Sep 21, 2010 at 9:24 AM, Data _null_; <iebupdte@gmail.com> wrote: > On Tue, Sep 21, 2010 at 9:17 AM, Viel, Kevin <kviel@sjha.org> wrote: > I am not sure how this might be better than: >> >> Where ( PRODUCT in('H','P','Q') or GROUP=:'E' ) >> And FLAG_A='Y' >> And FLAG_B='N'; >> And INCURRED_DATE between &DATE1 and &DATE2 >> ; > > It's not better but for a different purpose. > > SAME-AND Operator > Use the SAME-AND operator to add more conditions to an existing WHERE > expression later in the program without retyping the original > conditions. This capability is useful with the following: > > interactive SAS procedures > > full-screen SAS procedures that enable you to type a WHERE expression > on the command line > > any kind of RUN-group processing. > > Use the SAME-AND operator when you already have a WHERE expression > defined and you want to insert additional conditions. >


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