check for redundant data

  • Thread starter Thread starter andie
  • Start date Start date
A

andie

Guest
Hello,
I am trying to write a query that gets me rid of redundant data.
The table contains several lines that have the same content except for the primary key which is set to auto value. I do not want to change the primary key because I also want to add data to this table easily.
How can I check for redundant data within this table and delete it?
 
Hi ,

There may be a better way , but this works for me ..

Delete from Your_table
where Your_Autonumber in
(SELECT Max(YourAutoNumber) as Duplicate_record
FROM Your_table
GROUP BY A, B,C
HAVING Count(YourAutoNumber)>1);


:)
Gina.
 
Query your data, without the primary key, and group all fields (with the sigma symbol menu button). Add a Count column to indicate the number of rows accumulated on each row.
 

Users who are viewing this thread

Back
Top Bottom