|
|
Identitying duplicate values using self-join
I'm trying to identify unique values in a specific field. I have gone to
the FileMaker Help system and found the entry "Identitying duplicate values
using a self-join relationship".
I followed all instructions but all I see is the word "Duplicate" in the
Check Duplicates field, even in the records that I know are unique.
Does anyone know what I am doing wrong?? (Using FMP7.3). Do you need more
details??
TIA Dave
|
|
0
|
|
|
|
Reply
|
David
|
10/7/2005 1:12:16 PM |
|
I also tried to apply the technique given in the help to find the
duplicates. Did it work ? Yes and no. Yes, because I got the duplicates,
but No because the word "Duplicate" appeared even if it was not a
duplicate : I suspect that it has to do with the refreshing of the
field, as, when I click on a 'false' one it disappears. But I couldn't
get along correctly with it.
So I switched to another technique (in FMP6 but it should also work in
FM7) :
- create a relationship of the file to itself using as link a field
which you know should be unique if there were no duplicate.
- create a field named 'Duplicate' (calculation) =
Case(Sum(SelfRelationship::constant) >= 2; "DUPLICATE"; "") in which
Constant = 1.
With that if there are 2 copies of the same record, both will have the
term 'Duplicate', while if the Help technique was working, you'd have it
only in the second record.
Remi-Noel
"David Small" <davidsmall987@yahoo.com> a �crit :
> I'm trying to identify unique values in a specific field. I have gone
> to
> the FileMaker Help system and found the entry "Identitying duplicate
> values
> using a self-join relationship".
> I followed all instructions but all I see is the word "Duplicate" in
> the
> Check Duplicates field, even in the records that I know are unique.
> Does anyone know what I am doing wrong?? (Using FMP7.3). Do you need
> more
> details??
> TIA Dave
|
|
0
|
|
|
|
Reply
|
Remi
|
10/7/2005 1:56:32 PM
|
|
The record is seeing itself at the other end of your relationship. Make
sure your self-join relationship uses two predicates:
1) MatchField = MatchField
2) SerialID <> Serial ID
This way, the relationship will see all matches except for itself.
David Small wrote:
> I'm trying to identify unique values in a specific field. I have gone to
> the FileMaker Help system and found the entry "Identitying duplicate values
> using a self-join relationship".
>
> I followed all instructions but all I see is the word "Duplicate" in the
> Check Duplicates field, even in the records that I know are unique.
>
> Does anyone know what I am doing wrong?? (Using FMP7.3). Do you need more
> details??
>
> TIA Dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California
FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance
|
|
0
|
|
|
|
Reply
|
Howard
|
10/7/2005 2:47:01 PM
|
|
If FM6, I'd just use Count() to see how many records have the same join
field.
If >1, there are duplicates, obviously.
JJC
|
|
0
|
|
|
|
Reply
|
JohnJay
|
10/12/2005 7:03:31 PM
|
|
OH... you want to identify the ones to get rid of...ie the second,
third etc of the duplicated records... Could you seq number the
records and use another Calculation Field with Min() instead of Sum()
to find the record *not* to delete?
Is the problem with the Case statement? .... Should the ".........=2;"
be "..........=2,"
JJC
|
|
0
|
|
|
|
Reply
|
JohnJay
|
10/12/2005 7:16:02 PM
|
|
|
4 Replies
548 Views
(page loaded in 0.082 seconds)
|
|
|
|
|
|
|
|
|