How would you code a merge that will keep only the
observations that have matches from both sets.
Answer Posted / nishant
Using "IN" variable option. Look at the following example.
data three;
merge one(in=x) two(in=y);
by id;
if x=1 and y=1;
run;
| Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
Explain substr function?
what is proc Index? and what is proc document?
How can sas program be validated?
What are all the problems you faced while validating tables and reports?
What is the purpose of _character_ and _numeric_?
Mention few capabilities of sas framework.
Can you execute macro within another macro? : sas-macro
Give some ways by which you can define the variables to produce the summary report (using proc report)?
what is the effect of the options statement errors=1? : Sas programming
What is the difference between order and group variable in proc report?
How are numeric and character missing values represented internally?
what is the limit of the number of the rows and columns available in the worksheet? : Sas-bi
how does sas handle missing values in a merge? : Sas programming
if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...
how does sas handle missing values in formats? : Sas programming