Previous Page | Next Page

Methods of Combining SAS Data Sets

Comparing Modifying, Merging, and Updating Data Sets

The table that follows summarizes several differences among the MERGE, UPDATE, and MODIFY statements.

Criterion MERGE UPDATE MODIFY
Data sets must be sorted or indexed Match-merge: Yes

One-to-one merge: No


Yes No
BY values must be unique No Master data set: Yes

Transaction data set: No


No
Can create or delete variables


Yes Yes No
Number of data sets combined


Any number 2 2
Processing missing values Overwrites nonmissing values from first data set with missing values from second data set Default behavior: missing values in the transaction data set do not replace values in the master data set Depends on the value of the UPDATEMODE= option (see Comparing Modifying, Merging, and Updating Data Sets)

Default: MISSINGCHECK

Previous Page | Next Page | Top of Page