LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 11 Mar 2009 13:09:51 -0700
Reply-To:     david5705@HOTMAIL.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         david5705@HOTMAIL.COM
Organization: http://groups.google.com
Subject:      Combining data in single table: simple question
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

Dear All:

Simple question on combining data. How do I create the desired output? Simple case presented, but will likely be combining data from multiple tables and not just 3.

Thanks in advance for assistance.

data results_2008q1 ; infile datalines ; input quartile result_2008q1 ; datalines ; 1 100 2 110 3 90 4 200 ; run ;

data results_2008q2 ; infile datalines ; input quartile result_2008q2 ; datalines ; 1 125 2 100 3 95 4 205 ; run ;

data results_2008q3 ; infile datalines ; input quartile result_2008q3 ; datalines ; 1 150 2 105 3 175 4 195 ; run ;

data results_all ; set results_2008q1 results_2008q2 results_2008q3 ; run ;

/* Output obtained: quartile result_2008q1 result_2008q2 result_2008q3 1 100 . . 2 110 . . 3 90 . . 4 200 . . 1 . 125 . 2 . 100 . 3 . 95 . 4 . 205 . 1 . . 150 2 . . 105 3 . . 175 4 . . 195

Desired output: quartile result_2008q1 result_2008q2 result_2008q3 1 100 125 150 2 110 100 105 3 90 95 175 4 200 205 195 */


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