When merging 2 datasets with a common variable (not merge
key), how to keep both?
Answers were Sorted based on User's Feedback
Answer / reshma
data newdata;
merge dataset1 (in=a) datset2 (in=b);
if a or b;
by commonvar;
run;
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / vigneshwaran.s
Rename the variable in First data or in The Second Data:
Like,
Merge A(rename=(comman_var=New_var))(in=x)
B (in=y);
by New_var;
Run;
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / madhavi.nowduru@gmail.com
set dataset1 dataset2;
by var;
| Is This Answer Correct ? | 0 Yes | 3 No |
AE datasets names? how many types?
which domain is better in sas? clinical trails or banking
How many versions came upto now in SAS?
What are the different servers in sas? : sas-grid-administration
explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di
What is connection profile? : sas-grid-administration
The Lion King is hosting an animal conference. All the animals in the world attend except one. Which animal does not attend?
What is a post baseline?
If reading an external file to produce an external file, what is the shortcut to write that record without coding every single variable on the record?
Which are the statements whose placement in the data step is critical?
How many data types are there in SAS?
What are TEAEs
2 Answers Accenture, Quintiles,