user1054844
user1054844

Reputation: 972

Merging files in spss

Merging files in spss

Hi, 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.

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)?

Upvotes: 0

Views: 1521

Answers (2)

JKP
JKP

Reputation: 5417

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.

Upvotes: 0

Christian Sauer
Christian Sauer

Reputation: 10889

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.

Upvotes: 3

Related Questions