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

Why double trailing @@ is used in input statement?

706


Explain the purpose of substr functions in sas programming.

569


name the scheduler for scheduling job and explain the scheduler? : Sas-di

600


what is scheduling and how will u implement it. In scheduling 5 jobs r running if there is an error occured at 3rd job and how will u check and waht necessary steps will u take not to repeat the same mistake

1920


What is program data vector (pdv)?

637






How do dates work in SAS data?

691


what is sas application server? : Sas-di

546


What is the basic structure of a sas program?

602


How to test the debugging in sas?

612


What are the functions which are used for character handling functions?

620


how many types of prompts are there? : Sas-bi

557


Give some ways by which you can define the variables to produce the summary report (using proc report)?

602


why is sas considered self-documenting? : Sas programming

682


What is maximum number of rows and cols can be handled in SAS?

857


How many data types are there in SAS?

638