Subject | Re: [IBDI] Duplictes query |
---|---|
Author | Daniel Achermann |
Post date | 2001-06-05T15:02:38Z |
> I have a straightforward name & address table,Do a select-statement which joins the same tables for records having the same
> each record has a unique ID (primary key)
>
> I need to identify the ID of those records
> that are duplicated across the name and address
> fields, possibly with some degree of mismatch (ie
> a %LIKE% element)
value:
SELECT N1.NameID, N2.NameID
FROM Name N1, Name N2
WHERE N1.NameID < N2.NameID and (xxxx)
xxxx are your rules for duplicate records like N1.Prename = N2.Prename or
whatever.
N1.NameID < N2.NameID is for not getting the two similar records returned
twice.
The disadvantage of this statement is, that when you have three times the
same records you will get returned two rows.
Please notice, that this is not a support group! Go on with further support
question at ib-support in groups.yahoo.com.
Thanks
Daniel Achermann