Merging Data Files in SPSS

SPSS Merge Data Files - Match Files

For merging SPSS data files with similar cases but different variables, use MATCH FILES. Make sure your case identifier -if any- doesn't contain duplicate values and the files are sorted ascendingly on it. The result contains all cases from both files (like a full outer join in SQL).
Second, MATCH FILES also performs a table lookup as illustrated below.

SPSS Merge Data Files - Table Lookup

SPSS data files with similar variables but different cases can be merged with ADD FILES. Make sure that 1) variables and values have similar meanings across files and 2) string variables -if any- have similar lengths before you merge your files.


SPSS Data Merging Tutorials


Match files is an SPSS command that's mostly used for merging data holding the same cases but different variables. This tutorial walks you through some typical scenarios. Read More


ADD FILES is an SPSS command that's mainly used for merging data sources holding similar variables but different cases. This tutorial demonstrates how to use it and points out some pitfalls associated with ADD FILES. Read More

SPSS Add Files – Cautionary Note

Merging files with the ADD FILES command can be tricky. If variables or values have different meanings in different files, the result may be severely biased. Nevertheless, the command will run smoothly and the data will look normal. Read More