one to many merge

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

one to many merge

Raffe, Sydelle, SSA

I have two data sets which need to be merged. Each has a unique case id. One file has multiple records per case; the other has only 1 record per case.

 

There are a few columns of data from the second file (1 record per case) I want add to the first file (multiple records).

 

I also want to select only the case id’s in file one that appear in file 2.

 

Help would be appreciated.

Reply | Threaded
Open this post in threaded view
|

Re: one to many merge

Bruce Weaver
Administrator
See the "Match merging" tutorial here:

    http://www.ats.ucla.edu/stat/spss/topics/data_management.htm

Pay attention to:
1. The distinction between /FILE and /TABLE.  
2. The /IN subcommand.

HTH.

Raffe, Sydelle, SSA wrote
I have two data sets which need to be merged. Each has a unique case id. One file has multiple records per case; the other has only 1 record per case.

There are a few columns of data from the second file (1 record per case) I want add to the first file (multiple records).

I also want to select only the case id's in file one that appear in file 2.

Help would be appreciated.
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).