pspp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UPDATE code


From: John Darrington
Subject: Re: UPDATE code
Date: Sat, 6 Apr 2013 09:38:17 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Apr 05, 2013 at 02:35:31AM +0000, Crichton, Ronald wrote:
     I'm trying to get UPDATE to work but I'm not getting it.  Can you please 
tell me where I'm going wrong.
     
     I created two test files.  The master I called NAT99.sav and here is the 
data:
     1JOE M91
     2MARYF86
     3JACKM98
     4JILLF85
     5BOB M87
     6SUE F92
     
     And the transaction file I called NAT99_updates.txt, and here is the data:
     1JOE M19
     2MARYF86
     3JACKM98
     4JILLF85
     5XXX M87
     6SUE F29
     
     I then read each file creating a system file for each one.  Here is the 
code I used, hoping to see the master file updated with changes listed in the 
transaction file.  But the master file isn't updated.  Where am I going wrong?
     
     get file ='C:\PSPP_update\NAT99.sav'.
     update
                     /file = *
                     /file = 'C:\PSPP_update\NAT99NAT99_updates.txt.sav'
                     /in=infred
                     /by ClientID.
     execute.
     list.
     
     
     Thank you,  Ron

Well in your example, nothing very interesting will happen, bacause in both 
"master" and "update" 
ClientID contains exactly the same values.  Hence master will get completely 
overwritten by
update.  The normal use would have update containing only a subset of the 
values in master.

What are you trying to achieve?

J'



-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]