LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2010, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: Suren gc <gc_suren@YAHOO.COM>
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


Back to: Top of message | Previous page | Main SAS-L page