Date: Mon, 21 Mar 2005 15:42:20 -0500
Reply-To: Lei <kiki886@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lei <kiki886@GMAIL.COM>
Subject: A simple question on data update
Hi there
I wanna update the x values in data1 with the one in data2. While the merge
statement only changes the x value of the first record for id 2 and the
second one stays unchanged. Any ideas to fix this. TIA.
data data1;
input id x;
datalines;
1 5
2 8
2 8
3 7
;
data data2;
input id x;
datalines;
1 99
2 77
;run;
data test;
merge test new;
by id;
run;
|