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

Open 1toMany left.sav                 Open 1toMany right.sav 

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

A keyed table (also called lookup file) 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.

DATASET ACTIVATE DataSet1.

SORT CASES BY Key.

DATASET ACTIVATE DataSet2.

SORT CASES BY Key.

DATASET ACTIVATE DataSet1.

MATCH FILES /TABLE=*

  /FILE='DataSet2'

  /BY Key.

EXECUTE.

--- The End ---