Take the 2-minute tour ×

Merging files in spss


I have a problem in merging files. Here's what I need to do: I have chosen 200 cases from 7000 in ArcMap (GIS-program). In the process I have lost some of the cases' variable information. Now I would like to get the variables back to my smaller dataset, and I used data-> merge files > add variables, and ID as match, match cases on keyvariables in sorted files > both files provide cases. This gave a dataset of all the 7000 cases, only the variables already existed in the first table didn't add to the merged dataset. I tried also all different choises, but none of them gave me the result I wanted. This would be the 200 cases added with the variables that were lost in the process. I would be sooo happy if someone could advice me,

So in a nutshell how do I merge/replace the info from variables A (dataset) to variables B(dataset) without extra cases´ from A (only the info of the selected 200 cases´out of 7000)

Thanks Elina

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Out of hand: Create a new variable in the reduced DataSet with the Value of 1. Match the files. Sort by the new variable. Delete all cases who don't have the value 1 on this variable.

share|improve this answer
Thanks, it was easy :) –  user1054844 Sep 28 '12 at 10:27
add comment

I don't see why you are choosing both files provide cases. You want to use the 7000-case file as a keyed table using ID as the key and match it with the 200-case file, which provides all the cases. Assuming that you select all the variables from the large file that you want, this should give you the desired result.

share|improve this answer
add comment

Your Answer


