How would you code a merge that will keep only the
observations that have matches from both sets?
Answers were Sorted based on User's Feedback
Answer / vijay
Dear Guest,
Merge won't accept NODUPKEY option. it is for PROC SORT.
the following code will get only matched observations in
both datasets
data three;merge one (in=a) two (in=b);by **;if a and b;run;
| Is This Answer Correct ? | 12 Yes | 0 No |
Answer / murray
Both answers #2 and #3 will work fine, however the '= 1'
part is superfluous, and will work fine without.
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / san
data c;
merge data a(in=a)
dat b(in=b);
if a=1 and b=1;
by<common column>;
run;
| Is This Answer Correct ? | 0 Yes | 5 No |
what is the function of catx syntax? : Sas-administrator
if i having variables named a b c d e f ,how to find total of each variable ????give syntax...??
do you need to know if there are any missing values? : Sas programming
Mention what are the data types does SAS contain?
Can you excute a macro within a macro? Describe.
What is Transaction...? And what are Comment, Roll back n Save point..?
how does sas know on which server the piece of code to be executed ? say if a proc olap code is written then how the sas application would detect on which server to execute.
Are you familiar with special input delimiters How are they used?
What is the good sas programming practices for processing large data sets?
What is the order of evaluation of the following operators + - * / ** () ???
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
Name statements that are recognized at compile time only?