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 necessary is it to be creative in your work?
How do you test for missing values?
what are the scrubbing procedures in sas? : Sas programming
how sas deals with business intelligence? : Sas-bi
How do you use the do loop if you don’t know how many times you should execute the do loop?
How do dates work in sas?
for what purpose would you use the retain statement? : Sas programming
How is character variable converted into numeric variable and vice versa?
Mention common programming errors committed in sas ?
In proc transpose and data step with arrays which one you pick?
How many ways to overcome a missing values???
what are sas bi dashboard components? : Sas-bi
do you prefer proc report or proc tabulate? Why? : Sas programming
How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?
describe how to adjust the performance of data integrator? : Sas-di