Troubleshooting
Problem
I have two files that I am merging in SPSS via the Merge Files - Add Variables dialog box or the MATCH FILES command. Both files are sorted by the key variable, but when I merge the files, I get: >Warning # 5132 >Duplicate key in a file. The BY variables do not uniquely identify each case >on the indicated file. Please check the results carefully.
Resolving The Problem
Two or more cases in one or the other file (or both) share the same value on the key variable. If you wish to do a one-to-one merge, each file must have unique values for the key variable. (For example, File 1 can have cases with ID values 1, 2, and 3, and File 2 can have cases with values 1, 2, and 3, but only one case from each file can have an ID value of 1, one case from each file can have an ID value of 2, and so on.)
If one of your files has more than one value for the key variable, you will want to use a Table Lookup merge. The file with the multiple-cases-per-key-variable-value will be the keyed table file
Related Information
Historical Number
78529
Was this topic helpful?
Document Information
Modified date:
16 April 2020
UID
swg21477563