dbTalk Databases Forums  

Re: Identitying duplicate values using self-join

comp.databases.filemaker comp.databases.filemaker


Discuss Re: Identitying duplicate values using self-join in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Identitying duplicate values using self-join - 10-07-2005 , 08:56 AM






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 (AT) yahoo (DOT) com> a écrit :
Quote:
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



Reply With Quote
  #2  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Identitying duplicate values using self-join - 10-07-2005 , 09:47 AM






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:
Quote:
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


Reply With Quote
  #3  
Old   
JohnJay
 
Posts: n/a

Default Re: Identitying duplicate values using self-join - 10-12-2005 , 02:03 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


Reply With Quote
  #4  
Old   
JohnJay
 
Posts: n/a

Default Re: Identitying duplicate values using self-join - 10-12-2005 , 02:16 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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.