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 (March 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 18 Mar 2009 00:25:56 +0530
Reply-To:     Anindya Mozumdar <anindya.lugbang@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Anindya Mozumdar <anindya.lugbang@GMAIL.COM>
Subject:      Re: Delete Duplicated Records based on multiple columes, Thanks!
Comments: To: Nancy <nancy0318@gmail.com>
In-Reply-To:  <94a7b954-a072-4c93-86d6-190d53e2ae8d@c36g2000yqn.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1

On Wed, Mar 18, 2009 at 12:20 AM, Nancy <nancy0318@gmail.com> wrote: > I want to delete Duplicated records based on same ( last name, first > name, birthday, collected day, result, lab, lab number ) .At same time > I want to keep as much as more inforamtion for the other columes such > as address, city and state. > > Can anyone give me some hint about how to make this efficiency? > > Thank you so much! > > Nancy >

One way:

proc sort data = <dataset> nodupkey equals; by <variables on which you want to remove duplicates>; run;

This will keep the first observation for each duplicate value. Now for each particular value for the key, are you sure the address, city and state will be the same for all records of that key?

Regards, Anindya


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