Date: Tue, 29 Mar 2011 11:24:08 +1100
Reply-To: Thara Vardhan <email@example.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Thara Vardhan <firstname.lastname@example.org>
Subject: problem with Aggregate function - thank you
Dear List Members
First of all I would like to convey my heartfelt thanks to all those who
responded with suggestions/solution & syntax
to my problem with the aggregate command.
My apologies if i have not explained more clearly about my data file.
Ariel Barak solution of using identifying duplicates, match sequence and
select command does exactly what I need i.e
to create a output data file that has a unique legalaction record for
every eventrefnum and incidentnum based on the earliest legal action date.
Here is how i did it using the menu :
Ariel Barak Solution
First sort cases by Erefnum and Inc ref num
* Identify Duplicate Cases.
Define matching cases by Erefnum
Sort within matching groups by legactdate
Click on primary first
Click on sequential count of matching groups in each case
This will create 2 variables primary first and match sequence
Select if matchsequence =0.
This will give all unique records where there is only one legalactdate for
every eventref number/incidentrefnum.
Save it as file 1.
Select if match sequence not eq 0.
This will give eventref and incref records with multiple legal act dates.
Save this as file2.
In file 2 select if primary first =1.
This will give records where the legalactdate is the first.
Save this as file 3.
Than use match file add cases function to merge file1 and file3. This will
give a unique file for all legal actions.
While aggregate command helps me identify the earliest legal action date
through the mode=add variables function - it does not help me select
unique records to create a new datafile.
Thank you once again.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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.