Date: Mon, 1 Nov 2004 11:31:14 -0500
Reply-To: Richard Ristow <wrristow@mindspring.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <wrristow@mindspring.com>
Subject: Re: Joining files
In-Reply-To: <200411011346.iA1Dk2YL024551@listserv.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 08:46 AM 11/1/2004, Luana Bezerra wrote:
>I want to join two data files by a variable that is not an unique key.
It's easy, as long as the variable is a unique key in ONE of the files,
as yours is. Your variable COD is unique in file FIRST, and you want to
put all the data from FIRST in every matching record in SECOND.
MATCH FILES
/TABLE=FIRST /* Note TABLE */
/FILE=SECOND
/BY COD.
The trick is using "TABLE=" instead of "FILE=" in the MATCH FILES, for
the file where the key *is* unique.
|