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 (April 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 5 Apr 2007 14:30:21 -0700
Reply-To:   sdlenter <sdlentert@AOL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   sdlenter <sdlentert@AOL.COM>
Organization:   http://groups.google.com
Subject:   Remove duplicates keeping one
Comments:   To: sas-l@uga.edu
Content-Type:   text/plain; charset="iso-8859-1"

Let me rewrite my last request...using proc sql preferably I have a SAS dataset (table) it has 20 fields (columns) I only need to remove duplicates based on 4 out of 20 fields , keeping only one duplicate with the earliest date ( i have sas date as well as yyyymmdd) example F1 F2 F3 F4 F5 F6 F7 F8 121 df d4 fff 20040102 rtr rtr4 4545 121 df d4 fff 20040106 5rtr ryr4 7545 121 ft d4 ggg 20040404 5rtr 6yr4 7545 124 tt d4 ggg 2004704 5rtr 6yr7 7545

so I need to keep (my new table) F1 F2 F3 F4 F5 F6 F7 F8 121 df d4 fff 20040102 rtr rtr4 4545 121 ft d4 ggg 20040404 5rtr 6yr4 7545 124 tt d4 ggg 2004704 5rtr 6yr7 7545

Removing 2nd obs because F1, 2, 3, 4 match but it has a later date

thanks


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