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 (November 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 16 Nov 2008 09:30:33 -0500
Reply-To:     Randy <randistan69@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Randy <randistan69@HOTMAIL.COM>
Subject:      Merging

I have two data sets: data set one is as follows: date VarA VarB 01NOV2008 0 0 01NOV2008 0 1 01NOV2008 1 0 01NOV2008 1 1 02NOV2008 0 0 02NOV2008 0 1 02NOV2008 1 0 02NOV2008 1 1

data set two is as follows date VarA VarB VarC 01NOV2008 0 0 4 01NOV2008 1 0 3 01NOV2008 1 1 6 02NOV2008 0 0 8 02NOV2008 0 1 2 02NOV2008 1 1 5

I want to merge data set one with two to give the following output:

date VarA VarB VarC 01NOV2008 0 0 4 01NOV2008 0 1 . 01NOV2008 1 0 3 01NOV2008 1 1 6 02NOV2008 0 0 8 02NOV2008 0 1 2 02NOV2008 1 0 . 02NOV2008 1 1 5

My code is: proc sort data = one; by date VarA VarB ; run; proc sort data = two; by date VarA VarB ; run;

data need; merge one two ; by date VarA VarB ; run;

I am not getting the output. Am I making a mistake somewhere? Randy


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