Merging files in SPSS

Steve Simon


*Dear Professor Mean

Dear Computing,

Merging is tricky and here are a few things you have to look out for.

First make sure that the KEY VARIABLES are sorted in both files. Unsorted data will often cause problems with a merge.

Also make sure you are not mixing apples and oranges. If the KEY VARIABLES in one data set are numeric


A one-to-one merge occurs when each record in your first data set corresponds to a single record in your second data set. Possibly there might be some records in one data set that don’t have a partner in the other data set. That’s fine

If you have a one-to-one merge

A one-to-many merge occurs when a single record in your first data set might correspond to multiple records in the second data set. An example might be when your first data set contains information about the hospital that a patient was born in

If you have a one-to-many merge

A many-to-one merge is just the same except that the multiple records are in the first data set and not the second. This is like the situation where a wife can have more than one husband but not the reverse.

If you have a many-to-one merge

For the record

You can find an earlier version of this page on my original website.