Date: Thu, 11 Feb 2010 08:53:34 -0800
Reply-To: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject: Re: Join data horizontally
In-Reply-To: A<201002111548.o1BBkkrD012598@malibu.cc.uga.edu>
Content-Type: text/plain; charset="US-ASCII"
Hi Suren,
Well, as we know, most languages do not
allow more than one variable with the
same variable name. However, for dataset
one and two, you could distinguish them
by renaming them to A1 and A2 and B1 and B2.
The dataset option "rename" prior to a merge
in a datastep, or mere renames when using SQL
can accomplish this.
Hope this is helpful.
Mark Terjeson
Investment Business Intelligence
Investment Management & Research
Russell Investments
253-439-2367
Russell
Global Leaders in Multi-Manager Investing
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Suren gc
Sent: Thursday, February 11, 2010 7:48 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Join data horizontally
I want to join data horizontally without any common columns replacing
each
other. I want to have the joined data set to have all the datasets side
by
side with each other.
Data one;
A B
st 1
ts 2
Data two;
A B C
AR SE 44
TX SE 32
NY NE 30
Data three;
Species Cost
SW 32
HW 22
I want to join above three datasets in one single dataset with each
sitting
side by side with the other. My final dataset would be:
A B A B C Species Cost
st 1 AR SE 44 SW 32
ts 2 TX SE 32 HW 22
NY NE 30
Thanks,
Suren
|