- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 04-18-2017 09:52 AM
(1076 views)
I know how to merge 2 datasets.
Can someone please tell me how to merge 2 datasets rows common to both the datasets.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;