Page 1 of 1
need a query to delete duplicate records from a table
Posted:
Wed Nov 05, 2008 12:00 pm
by var111
Hi All,
I want to delete duplicates records from a table, suppose 4 records are duplicate then out of 4 3 we have to delete, can anyone give me that Query???
Re: need a query to delete duplicate records from a table
Posted:
Wed Nov 05, 2008 12:56 pm
by dick scherrer
Hello and welcome to the forum,
One way would be to unload the table (thereby creating a backup in case there are problems), remove the duplicates in batch using your sort product, then reload the non-duplicates back into the table.
You would also need to provide a clear definition of what constitutes a duplicate.
Re: need a query to delete duplicate records from a table
Posted:
Wed Nov 05, 2008 4:30 pm
by pooja katiyar
U can use" DISTINCT" to remove duplicacy
Re: need a query to delete duplicate records from a table
Posted:
Wed Nov 05, 2008 9:52 pm
by dick scherrer
Hello,
U can use" DISTINCT" to remove duplicacy
Please post the query that will delete duplicates from a table using distinct. . .
Re: need a query to delete duplicate records from a table
Posted:
Fri Nov 07, 2008 4:13 pm
by var111
Hi Pooja,
Distinct is not going to update any thing, it only shows the non duplicate records without updating the table.