|
David,
The hard way is an array solution, the easy way would be the transpose
solution. I would vote for transpose.
HTH
Toby Dunn
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
David Fickbohm
Sent: Thursday, July 22, 2004 10:48 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Transpose or a better way
People,
I am working in a PC XP Environment, using SAS 8.1
I know I can use proc transpose to accomplish the following task, but I
always like to learn some more and find a better/different way of doing
something. Working with SAS-L. is an excellant way to do this, in my
opinion. So the question is: Would you use proc transpose or ??
I have the following data:
id name email zip type city amt
11 john john@aaa.com y b sf 100
11 john john@aaa.com y s sr 95
22 mary zz@bbb.com n s xx 110
22 mary zz@bbb.com n s yy 85
22 mary zz@bbb.com n b aa 90
33 joe yy@ccc.com y b cc 120
33 joe yy@ccc.com y s dd 130
I want the output to look like the following:
id name email zip type city amt type city amt
type
city amt
11 john john@aaa.com y b sf 100 s sr 95
22 mary zz@bbb.com n s xx 110 s yy 85 b
aa 90
33 joe yy@ccc.com y b cc 120 s dd 130
Thanks for all thoughts, ideas, etc.
Dave
Dave Fickbohm
Data Mining Analyst
Homegain+
2450 45th St.
Emeryville, CA, 94608
Phone 510 655 0800 ext 4151
|