seeking help with match function error

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

seeking help with match function error

thara vardhan-2

Dear List members

Thank you very much David Wesserman for suggesting that I use match function to code locations data from a master list.  

I used the match function but to code locations as a numeric code in my data file from a global list of codes (created in an alphabetical order)I get an error message as follows:

DATASET ACTIVATE DataSet3.
MATCH FILES /TABLE=*
  /FILE='DataSet4'
  /BY Finalpremise.
EXECUTE.
File #1
     KEY: BLOCK OF UNITS (1 TO 4 FLOORS)

Error # 5131
Duplicate key on a TABLE file.  Each case on a TABLE file in MATCH FILES must
be uniquely identified by the BY variables.
This command not executed.

Any changes made to the working file since 12-FEB-2009 08:59:55 have been lost.
The time now is 09:01:42.

How do I over come this problem b'coz I have several records in my work file with the same location such as block of unit (1 to 4) because they are separate incidents.

many thanks

regards
Thara Vardhan
Senior Statistician
Performance Improvement & Planning
NSW Police
Tel: (02) 8835-8526



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

The information contained in this email is intended for the named recipient(s) 
only. It may contain private, confidential, copyright or legally privileged 
information.  If you are not the intended recipient or you have received this 
email by mistake, please reply to the author and delete this email immediately. 
You must not copy, print, forward or distribute this email, nor place reliance 
on its contents. This email and any attachment have been virus scanned. However, 
you are requested to conduct a virus scan as well.  No liability is accepted 
for any loss or damage resulting from a computer virus, or resulting from a delay
or defect in transmission of this email or any attached file. This email does not 
constitute a representation by the NSW Police Force unless the author is legally 
entitled to do so.


Reply | Threaded
Open this post in threaded view
|

Re: seeking help with match function error

David Wasserman

It’s possible that you have the table dataset and the file dataset reversed.  Your table dataset should be the one with the global list of codes in alphabetical order.  Each code and its autorecode-assigned number should be unique in that dataset.

 

 

David Wasserman

Educational Data Consultant

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Thara Vardhan
Sent: February-11-09 4:02 PM
To: [hidden email]
Subject: seeking help with match function error

 


Dear List members

Thank you very much David Wesserman for suggesting that I use match function to code locations data from a master list.  

I used the match function but to code locations as a numeric code in my data file from a global list of codes (created in an alphabetical order)I get an error message as follows:

DATASET ACTIVATE DataSet3.
MATCH FILES /TABLE=*
  /FILE='DataSet4'
  /BY Finalpremise.
EXECUTE.
File #1
     KEY: BLOCK OF UNITS (1 TO 4 FLOORS)

Error # 5131
Duplicate key on a TABLE file.  Each case on a TABLE file in MATCH FILES must
be uniquely identified by the BY variables.
This command not executed.

Any changes made to the working file since 12-FEB-2009 08:59:55 have been lost.
The time now is 09:01:42.

How do I over come this problem b'coz I have several records in my work file with the same location such as block of unit (1 to 4) because they are separate incidents.

many thanks

regards
Thara Vardhan
Senior Statistician
Performance Improvement & Planning
NSW Police
Tel: (02) 8835-8526


_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

The information contained in this email is intended for the named recipient(s) 
only. It may contain private, confidential, copyright or legally privileged 
information.  If you are not the intended recipient or you have received this 
email by mistake, please reply to the author and delete this email immediately. 
You must not copy, print, forward or distribute this email, nor place reliance 
on its contents. This email and any attachment have been virus scanned. However, 
you are requested to conduct a virus scan as well.  No liability is accepted 
for any loss or damage resulting from a computer virus, or resulting from a delay
or defect in transmission of this email or any attached file. This email does not 
constitute a representation by the NSW Police Force unless the author is legally 
entitled to do so.