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


Please Help Members By Posting Answers For Below Questions

explain about various caches available in data integrator? : Sas-di

576


name some data transformation used in sas di? : Sas-di

540


Of all your work, where have you been the most successful?

4196


What are the scrubbing procedures in sas?

567


what is operational data and operational system? : Sas-di

631






Describe the function and untility of the most difficult SAS macro that you have written.

1556


Describe a time when you were really stuck on a problem and how you solved it?

2201


What is by-group processing?

574


what is data integration? : Sas-di

610


describe the interaction table in sas di? : Sas-di

589


if you were told to create many records from one record, show how you would do this using array and with proc transpose? : Sas programming

538


explain about data integrator metadata reports? : Sas-di

558


What are the parameters of scan function?

616


What will calendar procedure do?

593


explain about sas business intelligence? : Sas-bi

596