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 13:45:22 +0530
Reply-To:   Madan Gopal Kundu <Madan.Kundu@RANBAXY.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Madan Gopal Kundu <Madan.Kundu@RANBAXY.COM>
Subject:   Re: using proc sql
Comments:   To: shashi <shashi2707@GMAIL.COM>
In-Reply-To:   A<957d89c4-fee9-4884-afa2-5aa55373086c@c65g2000hsa.googlegroups.com>
Content-Type:   text/plain; charset="us-ascii"

Here is the required code:

data one; input a b; cards; 1 10 2 20 3 30 4 30 5 70 6 80 ; run;

proc sql; create table des as select count(*) as count, a, b from one group by b having count(*)=1; quit;

Cheers!!

Madan Gopal Kundu Biostatistician, CDM, MACR, Ranbaxy Labs. Ltd. Tel(O): +91 (0) 1245194045 - Mobile: +91 (0) 9868788406

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of shashi Sent: Thursday, August 07, 2008 1:21 PM To: SAS-L@LISTSERV.UGA.EDU Subject: using proc sql

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?

(i) The information contained in this e-mail message is intended only for the confidential use of shashi2707@GMAIL.COM;SAS-L@LISTSERV.UGA.EDU. This message is privileged and confidential. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message.

(ii) Madan.Kundu@ranbaxy.com confirms that Ranbaxy shall not be responsible if this email message is used for any indecent, unsolicited or illegal purposes, which are in violation of any existing laws and the same shall solely be the responsibility of Madan.Kundu@ranbaxy.com and that Ranbaxy shall at all times be indemnified of any civil and/ or criminal liabilities or consequences there.


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