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 (August 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 7 Aug 2008 01:11:07 -0700
Reply-To:     karma <dorjetarap@GOOGLEMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         karma <dorjetarap@GOOGLEMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: using proc sql
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

On Aug 7, 8:50 am, shashi <shashi2...@gmail.com> wrote: > Hi, > Here I have a situation where I have to delete some observations from > a dataset and have to pass the remaining observations into another > dataset. > For Example, > > a b > 1 10 > 2 20 > 3 30 > 4 30 > 5 70 > 6 80 > > Here 30 is repeated for b. Now I want to delete both the rows > including 30 and pass the remaining all into another dataset. > The final dataset should be > > a b > 1 10 > 2 20 > 5 70 > 6 80 > > Could anybody suggest a code in proc sql for this?

proc sql; select a, b from have group by b having count(b) = 1; quit;

HTH


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