Hi @Caroline Webb
See the online documentation for one to one merges, and the MATCH FILES command syntax
As you'll see in the "one to one" examples all of the MATCH FILES commands are using the /FILE subcommand only.
You are likely doing a "one to many" type of merge where one file contributes cases, and the other is a table lookup. The /FILE subcommand always contributes its cases to the resulting file. The /TABLE subcommand contributes unique new variables based upon the unique combinations of the Key variable(s).
I hope this helps!
------------------------------
David Dwyer
SPSS Technical Support
IBM Software
------------------------------
Original Message:
Sent: Wed September 06, 2023 11:34 AM
From: Caroline Webb
Subject: data not merging correctly with one-to-one key variables
Hi all,
I hope your day is going well.
I am trying to merge two data sets- the primary set has the correct/desired amount of rows/ cases (298) and the second set I am merging into it has extra cases (350), the ones which don't match to the 298 document of which I am hoping will be discarded once the merge occurs. The two key variables/ columns have the same IDs as far as I can tell, and yet when I try to merge them the data gets totally scattered and out of whack/alignment. I compared the two docs and got a 99% mismatch rate and am confused on what that means/where to go from here. I attached a picture of the comparison results for clarification. Sorry if this isn't the right forum- thanks in advance!
------------------------------
Caroline Webb
------------------------------