Code: Select all
Tim Allan wrote:Apologies if this is a real beginners' question - I am quite new to SPSS.
I have two SPSS datasets (D1 and D2), each with different layouts. Both
datasets contain one common field (Field X).
What I want to do is this: for each occurence of Field X in dataset D1, I
want to check if it exists in D2 and, if so, either flag it or filter it
out to a new dataset. Both datasets contains tens of thousands of records,
thus preventing me from doing it manually.
All occurences of Field X in D1 are present in D2. However, in D2 there
are many other occurences of Field X that I am not interested in, hence the
exercise of removing them.
Can anyone help out please?
Niat wrote: So all the ID-numbers in Dataset 1 are definitley available in Dataset 2 but I want to extract those ID-number in Dataset 1 from Dataset 2 including the values of the variables. Do I do it the same way?
- In file 1, create a new variable with the value 1 for each case (call it CONS or something).Niat wrote: And could you explain the steps a bit more closely.
in order to be able to merge, the ID variables have to be of the same type and length etc.When I sort the variable ID, does it make a difference since the ID observations are not listed the same on the txo datasets since the other one contains less observations. Is this a problem when I merge?
Users browsing this forum: No registered users and 1 guest