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 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 10 Jan 2008 18:12:22 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: PROC SQL--select DISTINCT
Comments: To: Tom White <tw2@mail.com>
In-Reply-To:  <20080110175444.BB3931F50B1@ws1-2.us4.outblaze.com>
Content-Type: text/plain; charset="Windows-1252"

Tom ,

Im not sure what you are trying to end up with. Your code and what I gather from your write up is basically after distinct values of soome variables but non distinct values of others. The structure doesnt makes sense, in order to get the distinct values you will have to eleminate some of the values from the non distinct values, in order to get the non distinct values you have to make the distinct values non distinct.

Toby Dunn

"Don't bail. The best gold is at the bottom of barrels of crap." Randy Pausch

"Be prepared. Luck is where preparation meets opportunity." Randy Pausch

> Date: Thu, 10 Jan 2008 12:54:44 -0500 > From: tw2@MAIL.COM > Subject: PROC SQL--select DISTINCT > To: SAS-L@LISTSERV.UGA.EDU > > Hello SAS-L > > I have a SAS data set with many fields (variables). > > Suppose I would like to write sql code like > > proc sq; > create table FOO2 as > select(distinct VAR1), distinct(VAR2), distinct(VAR3), > VAR4, VAR5 > from FOO1 > group by VAR1, VAR2, VAR3, VAR4, VAR5; > quit; > > SAS does not recognize the distinct function. In other words, > I cannot write > > ..... > select(distinct VAR1), distinct(VAR2), distinct(VAR3), > ..... > quit; > > Is there any way to select multiple DISTINCT variables like I am attempting to do above? > > Thank you. > T > > -- > Are we headed for a recession? Read more on the Money Portal > Mail.com Money - http://www.mail.com/Money.aspx?cat=money

_________________________________________________________________ Make distant family not so distant with Windows Vista® + Windows Live™. http://www.microsoft.com/windows/digitallife/keepintouch.mspx?ocid=TXT_TAGLM_CPC_VideoChat_distantfamily_012008


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