IBM Support

Warning 5132 when merging files

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

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF014","label":"iOS"},{"code":"PF033","label":"Windows"}],"Version":"19.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

78529

Document Information

Modified date:
16 April 2020

UID

swg21477563