Previous Page | Next Page

Merging SAS Data Sets

Introduction to Merging SAS Data Sets


Purpose

Merging combines observations from two or more SAS data sets into a single observation in a new SAS data set. The new data set contains all variables from all the original data sets unless you specify otherwise.

In this section, you will learn about two types of merging: one-to-one merging and match merging. In one-to-one merging, you do not use a BY statement. Observations are combined based on their positions in the input data sets. In match merging, you use a BY statement to combine observations from the input data sets based on common values of the variable by which you merge the data sets.


Prerequisites

Before continuing with this section, you should be familiar with the concepts presented in Starting with Raw Data: The Basics and Starting with SAS Data Sets.

Previous Page | Next Page | Top of Page