*** Datasets must be sorted on key variables prior to merging. ***

Open 1to1 left.sav                         Open 1to1 right.sav 

Go to 1to1 left.sav → Data → Merge Files → Add Variables

A keyed table (also called lookup table) has two basic characteristics:

  1. A keyed table has to have unique cases based on the key variable(s).
  2. A keyed table doesn't contribute cases to the merged file. It contributes variables only.

Of note: For SPSS 28, you will have to mark the merge method as a "one-to-many merge based on key values" to select the Lookup Table

  1. Selecting the non-active dataset will merge values from second dataset to the to the first dataset based on the key

DATASET ACTIVATE DataSet1.

SORT CASES BY Key.

DATASET ACTIVATE DataSet2.

SORT CASES BY Key.

DATASET ACTIVATE DataSet1.

MATCH FILES /FILE=*

  /TABLE='DataSet2'

  /BY Key.

EXECUTE.

--- The End ---