MarkTac
Programmer
- Nov 24, 2011
- 7
Hi,
I'm writing a code to DELETE all duplicate records. I can easily find all duplicates with SELECT statement. However, I'm confused how to integrate my SELECT into DELETE statement:
SELECT [col1], [col2], [col3] FROM [table1] GROUP BY [col1], [col2], [col3] HAVING (COUNT([col2])>0)
Thank you.
I'm writing a code to DELETE all duplicate records. I can easily find all duplicates with SELECT statement. However, I'm confused how to integrate my SELECT into DELETE statement:
SELECT [col1], [col2], [col3] FROM [table1] GROUP BY [col1], [col2], [col3] HAVING (COUNT([col2])>0)
Thank you.