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 (January 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 10 Jan 2008 10:23:42 -0500
Reply-To:     sas biology <sasbio@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         sas biology <sasbio@GMAIL.COM>
Subject:      A merge question
Content-Type: text/plain; charset=ISO-8859-1

Hi Group ,

I have the following data. I need to merge both the data sets so that I get all the subjects (1, 2 , 3 in this example). Can anyone help me how I can do this . I tried a proc sql left join with the code given below. But I am not getting subject 3 in the output data set.

Thanks a lot SB

*

proc* *sql* noprint;

create table wanted as

select *

from one as a left join two as b on a.subject=b.subject;

quit;

*

data* one;

input subject visit value;

cards;

1 1 5

1 2 10

1 3 15

2 1 10

2 2 15

2 3 20

;; *

run*; *

data* two;

input subject visit1 value1;

cards;

1 1 50

1 2 55

1 3 60

1 4 65

3 1 55

3 2 60

3 3 65

;; *

run*;

**

**


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