Date: Tue, 6 Sep 2005 10:02:39 -0700
Reply-To: Toby <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Toby <tobydunn@HOTMAIL.COM>
Organization: http://groups.google.com
Subject: Re: Find unique records and recode
In-Reply-To: <1125930283.473322.87650@f14g2000cwb.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"
tortoise ,
proc sql ;
select first.* , new2 as new
from one as first
left join
(select * , count(*) as new , monotonic(calculated new) as new2
from one
group by old) as second
on first.old = second.old ;
quit ;
Hi,
I have one character variable (old).
There are many combinations of "old" variable.
How could I find unique and recode those data to "new"?????
old new
5269-7c 1
5269-8c 2
5269-8c 2
5269-3z 3
5222-7z 4
5222-7z 4
5222-7z 4
...........
Thanks~
|