Please write codes to merge two datasets and keep every
record in the first dataset.



Please write codes to merge two datasets and keep every record in the first dataset...

Answer / reshma

proc sort data=dataA;
by commonvar;
run;

proc sort data=dataB;
by commonvar;
run;

data new;
merge dataA (in=a) dataB (in=b);
if a ;
by commonvar;
run;

Is This Answer Correct ?    14 Yes 0 No

Post New Answer

More SAS Interview Questions

what are _numeric_ and _character_ and what do they do? : Sas programming

0 Answers  


In the flow of DATA step processing, what is the first action in a typical DATA Step?

9 Answers  


There is a field containing a date. It needs to be displayed in the format "ddmonyy" if it's before 1975, "dd mon ccyy" if it's after 1985, and as 'Disco Years' if it's between 1975 and 1985. How would you accomplish this in data step code? Using only PROC FORMAT

8 Answers   D&B,


what the use of proc glm

1 Answers   Accenture, C Marc,


Can anyone help me about SAS Realtime scenarios in Clinical field

0 Answers  






"What is the difference between proc sort nodup and proc sort nodupkey?"

2 Answers  


how to write code for left outer join in SAs using datastep?

8 Answers   CitiGroup,


how do you derive descriptive statistics?

1 Answers   Accenture, Quintiles,


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

0 Answers  


What are the ways in which macro variables can be created in sas programming?

0 Answers  


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

0 Answers  


Did you used proc lifetest? when?

2 Answers   Accenture, Parexel, Quintiles,


Categories