Interview Questions   Tutorials   Discussions   Programs   Videos   

SAS - How would you code a merge that will keep only the observations that have matches from both sets?




335
views
asked mar September 20, 2014 06:30 AM  

How would you code a merge that will keep only the observations that have matches from both sets?


           

1 Answers



 
answered By vishnoiprem   0  

Check the condition by using If statement in the Merge statement while merging datasets.

data MRG;
merge data A(in=A)
dat B(in=B);
if A=1 and B=1;
by<common column>;
run; 
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert