LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 5 Mar 2007 19:44:40 +0100
Reply-To:     Balmer Thomas <Thomas.Balmer@phbern.ch>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Balmer Thomas <Thomas.Balmer@phbern.ch>
Subject:      Re: AW: Re: Import values in a part of the cases
Content-Type: text/plain; charset="iso-8859-1"

Thanks, Melissa, for your patience.

I've tried it now this way and got a new error: SPSS claims: Each case on a TABLE file in MATCH FILES must be uniquely identified by the by variables.

Thats probably not the case: In the A-File (*-File) are different cases with the same BY-variables Nachname and Vorname. They are unique only in the TABLE file. But thats exactly what Iwant: to put in the A-file by all these matching cases the values of different variables from the B-file (TABLE file). But first I have to rename the variables in the B-file in order to be the same as in the A-file. So I ended with this Syntax and the mentioned error: MATCH FILES /TABLE='B1' /RENAME Name=Nachname Mail_g=Email Ort_Wohn=Ort Str_Wohn=Strasse /FILE=* /BY Nachname Vorname. EXE.

-----Ursprüngliche Nachricht----- Von: SPSSX(r) Discussion im Auftrag von Melissa Ives Gesendet: Mo 05.03.2007 16:27 An: SPSSX-L@LISTSERV.UGA.EDU Betreff: Re: AW: Re: Import values in a part of the cases Thomas,

(As noted in my message to you on Fri 3/2/2007 11:28 AM) Remember that the order of the files matters, so IF the variables you want to add from the lookup table are already IN the main file, then the /TABLE= subcommand needs to come BEFORE the /FILE= subcommand. (works the same way in regular match with 2 (or more) /FILE= statements) If a variable is common to both files, the one in the first listed file is what is retained.

So you would need to switch your file order in the MATCH command to be: MATCH FILES /TABLE='B1' /FILE=* /RENAME Name=Nachname Mail_g=Email Ort_Wohn=Ort Str_Wohn=Strasse /DROP= Beginn Desig_PH Ende Funkt_1 Funkt_2 Funkt_3 Sex /BY Nachname Vorname. EXE.

Melissa The bubbling brook would lose its song if you removed the rocks.

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Balmer Thomas Sent: Monday, March 05, 2007 3:02 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: [SPSSX-L] AW: Re: Import values in a part of the cases

I tried the TABLE subcommand like this:

MATCH FILES /FILE=* /TABLE='B1' /RENAME Name=Nachname Mail_g=Email Ort_Wohn=Ort Str_Wohn=Strasse /DROP= Beginn Desig_PH Ende Funkt_1 Funkt_2 Funkt_3 Sex /BY Nachname Vorname. EXE.

...renaming variables in the file B1 to match with the variables in the *-file (which is the master) and droping a few. Strange Result: Nothing. The Syntax seems to work, because I got no error, but the values from B1 are not printed in the file *.

-----Ursprüngliche Nachricht----- Von: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] Im Auftrag von Melissa Ives Gesendet: Freitag, 2. März 2007 16:30 An: SPSSX-L@LISTSERV.UGA.EDU Betreff: Re: Import values in a part of the cases

You may want to use TABLE instead of UPDATE. Look at the Operations of each to see which one retains the records you want. In TABLE, only records that match in the FILE are included. In UPDATE, new records are created in the master file if they are in the update file but not in the master. I believe this means that they would work similarly IF you have exactly the same records (per the matching variables) in both files.

Melissa The bubbling brook would lose its song if you removed the rocks. -----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Balmer Thomas Sent: Friday, March 02, 2007 7:01 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: [SPSSX-L] Import values in a part of the cases

Hi

The aim would be to import values of a couple of string variables in these cases, which match with the values of two variables (Firstname and Name).

But the matching command seems to allow just two other purposes: to add new variables or to add new cases. I'd like to import just the values in existing variables (Street, Town, Email) for the matching cases, without adding new variables or cases.

It's probably a total different command I need...

Thanks for Help!

Tom

PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance.


Back to: Top of message | Previous page | Main SPSSX-L page