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!
Content-Type: text/plain; charset=ISO-8859-1
On Wed, Mar 18, 2009 at 12:20 AM, Nancy <firstname.lastname@example.org> 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!
proc sort data = <dataset> nodupkey equals;
by <variables on which you want to remove duplicates>;
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?