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.
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!