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
What are the differences between proc means and proc summary?
Which function is used to count the number of intervals between two sas dates?
How you can read the variables that you need?
What is the difference between where and if statement?
how do you debug and test your sas programs? : Sas programming
What is the basic syntax of a sas program?
why a stop statement is needed for the point= option on a set statement?
How is character variable converted into numeric variable and vice versa?
how does sas handle missing values in functions? : Sas programming
what is the primary data source for the wrs? : Sas-bi
is data integration and etl programming is same? : Sas-di
What is the maximum and minimum length of macro variable
To what type of programms have you used scratch macros?
How would you include common or reuse to be processed along with your statements?
What is the basic syntax style in SAS?