Re: Duplicate Records
From: <vermaat_at_gemini.tfdl.agro.nl>
Date: 1996/10/30
Message-ID: <1996Oct30.125530.568_at_ns2>#1/1
| Peter J.R. Vermaat | Dutch Department of Agriculture | Wageningen |
| p.j.r.vermaat_at_fd.agro.nl | http://www.agro.nl/~vermaat/ |
Date: 1996/10/30
Message-ID: <1996Oct30.125530.568_at_ns2>#1/1
In article <326FE2E4.7086_at_indy.net>, Richard William Howell <rwh_at_indy.net> writes:
>I am trying to write a query which will extract a list of duplicate rows
>in my table so that I may examine the duplicate records and eliminate
>the "bad" one or more. Any suggestions appreciated.
INSERT INTO [dump_table]
SELECT [primary_key_columns concatenated by ||] FROM [table_to_be_checked]
GROUP BY [primary_key_columns concatenated by ||]
HAVING COUNT([primary_key_columns concatenated by ||]) > 1;
This should do the trick.
| Peter J.R. Vermaat | Dutch Department of Agriculture | Wageningen |
| p.j.r.vermaat_at_fd.agro.nl | http://www.agro.nl/~vermaat/ |
| Flagellant in Dreamland | ********************************************************************************Received on Wed Oct 30 1996 - 00:00:00 CET