When merging 2 datasets with a common variable (not merge
key), how to keep both?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to read the variables in sas? : Sas-administrator

820


what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming

804


What do you know about symput and symget?

981


Explain the special input delimiters used in sas programming.

812


Explain the difference between using drop = data set option in set and data statement?

958


How do you connect the desktop application to metadata server? : sas-grid-administration

872


What are the default statistics that proc means produce?

821


What do you know about sas and what we do? : sas-grid-administration

839


what is business intelligence? : Sas-bi

837


what are the scrubbing procedures in sas? : Sas programming

1082


What are the advantages of using sas?

896


What are the five ways to do a table lookup in sas? : sas-grid-administration

854


What are the scrubbing procedures in sas?

798


how to do user inputs and command line arguments in sas?

2712


If money were no object, what would you like to do?

2939