04-18-2017 09:52 AM - last edited on 04-18-2017 10:46 AM by Reeza
I know how to merge 2 datasets.
Can someone please tell me how to merge 2 datasets rows common to both the datasets.
04-18-2017 10:01 AM - edited 04-18-2017 10:47 AM
We can't understand your question.
Please post sample input and output data to illustrate your issue.
EDIT: Here's the SAS resource on combining datasets and all the different ways.
04-18-2017 10:01 AM
Refer to this visual below which shows SQL code, however the same is possible in datastep merge using in= on both datasets:
data want; merge have1 (in=a) have2 (in=b); by merge_variables; if a and b; run;