| Date: | Tue, 31 Jul 2007 16:01:20 -0400 |
| Reply-To: | souga soga <souga1234@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | souga soga <souga1234@GMAIL.COM> |
| Subject: | SQL |
| Content-Type: | text/plain; charset=ISO-8859-1 |
Hi,
I have a data set :
Var1 Var2
A 2
A 1
B 2
B 2
C 5
D 1
R 7
R 7
I would like to the output to look like this:
MyKey Var1 Var2
1 A 2
2 A 1
3 B 2
3 B 2
4 C 5
5 D 1
6 R 7
6 R 7
i.e i would like to create a counter (MyKey variable) which identifies the
uniques and duplicates in this manner.
I need this to be done using PROC SQL .
Thanks,
Sa
|