Date: Tue, 18 Aug 2009 11:30:51 -0400
Reply-To: Ming Chen <chenming@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ming Chen <chenming@GMAIL.COM>
Subject: Re: How to generate a unique numeric key variable from several
columns
In-Reply-To: <52fcff540908180752o2c972189kbb83bd356633505@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Thanks for the replies.
1. The reason is that I want to generate that unique numeric key is to
pass it to excel in order to speed up the excel operations.
2. the combination of k1,k2,k3,k4,k5 is unique. the range of these 5
key is 1 to 100.
3. I really want is to generate the same unique numeric keys for the
same combination of those 5 keys.
More exampels
K1 K2 K3 K4 K5
1 1 11 4 9
1 1 1 1 49
1 1 1 2 49
1 1 12 4 9
1 1 1 3 12
1 1 13 1 2
1 1 1 3 35
1 1 13 3 5
1 1 13 3 6
1 1 1 3 36
1 1 1 3 49
1 1 13 4 9
1 1 14 1 8
1 1 1 4 18
1 1 1 4 49
1 1 14 4 9
1 1 15 4 9
1 1 1 5 49
1 1 1 6 49
1 1 16 4 9
1 1 1 7 49
1 1 17 4 9
Thanks
On Tue, Aug 18, 2009 at 10:52 AM, Ming Chen<chenming@gmail.com> wrote:
> Hi All,
>
> I wonder if there is better way or function that I can generate a
> unique numeric key from several numeric keys. For example,
>
> Obs k1 k2 k3 k4 k5
> 1 1 1 11 4 9
> 2 1 1 1 14 9
>
> Right now my solution is generate the key as key for obs1 is
> 0101110409,obs is 0101011409.
>
>
> Thanks
>
|