this is a sample datasets need to be update one columns only .same columns name but different values add only like age in first ds. data step or proc sql; common values dob and name Please help me thanks first data set
data sql;
input name $4. age 2. dob 8. address $5.;
datalines;
john 94 kkdi
john 88 pdk
john 93 cbe
;
run;
second dataset
data sql;
input name $7. age 2. dob 8. address $5.;
datalines;
john 1 94 mmm
john 0 88 xxx
laya 1 93 yyy
;
run;
output:
john 1 94 kkdi
john 0 88 pdk
laya 1 93 cbe
I am not sure if I got your question. But comparing the two datasets and the desired output, it seems that "dob" variable is your id, and you want to get the address from the first table into the second one.
So, what you need is:
Best,