Date: Fri, 31 Jul 2009 09:17:24 -0500
Reply-To: OR Stats <stats112@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: OR Stats <stats112@GMAIL.COM>
Subject: No Dupkey by Criteria
Content-Type: text/plain; charset=ISO-8859-1
Hello:
In PROC SORT, can we choose which duplicate record to keep by a conditional
statement?
For example, my data looks like this
Date Y
1/3/09 50
1/5/09 100
1/5/09 200
1/6/09 300
1/6/09 10
For 1/5, Y=200 is kept and Y=100 is deleted; whereas for 1/6, Y=300 is kept
and Y=10 is deleted. The final data would look like the following
Date Y
1/3/09 50
1/5/09 200
1/6/09 300
Thanks!
|