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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do dates work in SAS data?

682


Approximately what date is represented by the SAS date value of 730?

744


What is the role of administrative users? : sas-grid-administration

657


Have you ever used the SAS Debugger?

1203


what is data access? : Sas-di

603






Tell e how how dealt with..

1752


How would you define the end of a macro? : sas-macro

608


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

592


how does sas handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, procs? : Sas programming

598


what is function of retain statment

1522


how do you debug and test your sas programs? : Sas programming

558


State the difference between INFORMAT and FORMAT ?

593


what is the use of proc sql? : Sas programming

592


How would you identify a macro variable? : sas-macro

530


What are the new features included in the new version of SAS Programming Language?

733