How would you code a merge that will keep only the
observations that have matches from both sets.
Answer Posted / madhavi
proc sort data=one;
by id;
run;
proc sort data=two;
by id;
run;
data comm_rec;
merge one(in=a) two(in=b);
by id;
if a and b;
run;
proc print data=comm_rec;
run;
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
How do you specify the number of iterations and specific condition within a single do loop?
What are all the problems you faced while validating tables and reports?
What do you code to create a macro? : sas-macro
What is Linear Regression?
what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming
how does sas handle missing values in a merge? : Sas programming
I have 3 years of work experience at a startup and recently got certified in Data Science with SAS. I need to know how to get into the analytics industry
What is the difference between SAS functions and procedures?
what is the basic structure sas administrator? : Sas-administrator
what is intially documentation in sas?
hi all, I need the SAS DI DUMP(A00 260) for attending the certification. if any one have, pls provide it.Please Email to vrpotluri@hotmail.com. Thanks - Ramana
What are the different versions of sas that you have used until now? : sas-grid-administration
What was the last computer book you purchased? Why?
what is change analysis in sas di ? : Sas-di
what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming