Interview Questions   Tutorials   Discussions   Programs   Videos   

SAS - What is the difference between SET and MERGE?

asked mar September 20, 2014 06:30 AM  

What is the difference between SET and MERGE?


1 Answers

answered By vishnoiprem   0  

The MERGE statement and the UPDATE statement both match observations from two SAS data sets; however, the two statements differ significantly. It is important to distinguish between the two processes and to choose the one that is appropriate for your application.

The most straightforward differences are as follows: The UPDATE statement uses only two data sets. The number of data sets that the MERGE statement can use is limited only by machine-dependent factors such as memory and disk space.

A BY statement must accompany an UPDATE statement. The MERGE statement performs a one-to-one merge if no BY statement follows it. The two statements also process observations differently when a data set contains missing values or multiple observations in a BY group.

   add comment

Your answer

Join with account you already have



Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!