Re: De-duplicating (was Re: Finding duplicate rows in a table)
Date: Sun, 7 Aug 1994 07:59:20 +0000
Message-ID: <776246360snz_at_aboy.demon.co.uk>
In article <tcoxCu2K2G.MH7_at_netcom.com> tcox_at_netcom.com "Thomas B. Cox" writes:
> >MarkB_at_aboy.demon.co.uk writes:
> >>The question is, are these rows truly identical throughout, or do they
> >>simply have identical primary keys?
>
> If he has "duplicate records" as he claims, then all values in all
> columns are the same for at least two rows.
Fair enough - I was trying to be exact in terms of defining the problem.
>
> >>If the former, it doesn't matter which you delete, therefore simply
> >>delete the one with the max(rowid) in a correlated query.
>
> Close, but not quite. Deleting using max(rowid) only takes out one
> row. What if you have three or four duplicates?
No - I don't think so. You can only have two in a pair of duplicates. If you have three rows the same, what you've got is a triplicate. The confusion arises because the word has taken on a different meaning (and in my opinion a misleading one, otherwise we wouldn't be discussing it) within RDBMS-speak than it has in the real English-speaking world.
Of course, within the context of this group, it was dumb of me to proceed without declaring my pedantry on such matters. My apologies.
Cheers,
M
-- ----------------------------------------------------------------------------- MarkB_at_aboy.demon.co.uk Lyric Quiz of the Week: "You snatch a tune and you match a cigarette..."Received on Sun Aug 07 1994 - 09:59:20 CEST