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 (January 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 12 Jan 2006 08:41:32 -0800
Reply-To:     monal kohli <k_monal_99@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         monal kohli <k_monal_99@YAHOO.COM>
Subject:      Re: WHERE statment in PROC SQL
Comments: To: "antje.schuele@googlemail.com" <antje.schuele@GOOGLEMAIL.COM>
In-Reply-To:  <1137083456.233428.240000@g43g2000cwa.googlegroups.com>
Content-Type: text/plain; charset=iso-8859-1

data x; set xy; where trim(left(upcase(col1))) in ('VALUE1' 'VALUE3') or trim(left(upcase(col2))) in ('VALUE1' 'VALUE3') or trim(left(upcase(col3))) in ('VALUE1' 'VALUE3') ; RUN;

Is this what you are trying to do..

HTH Mona

--- "antje.schuele@googlemail.com" <antje.schuele@GOOGLEMAIL.COM> wrote:

> Dear group, > > I have data with 6 columns and want to find out how > many rows contain > certain values in column 2-6. > > So I ask for example: > SELECT count(col1) FROM xy WHERE col2-col6 IN > (value1, value3); > > This does not work. > > To make it clear: I want to have the number of rows > where col2 or col3 > or ... or col6 contain value1 and value3. It is > possible that they > contain other values as well but that's also ok. > > Thanks a lot for any hint how to define the "WHERE" > statement. > > Greetings, Antje >

__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com


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