Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
cr8nk
Yak Posting Veteran
77 Posts |
Posted - 2001-11-30 : 13:19:37
|
| Hello,I need to remove about one million duplicate rows from a 11 million row table and I want to determine the exact count of duplicates that I have and remove them from the table.Here is the table structure.ADACCT varchar 15ADFCDE varchar 10ADCCDE varchar 10ADACDE varchar 10ADATYP varchar 2ADCUSR varchar 50ADADAT numeric 9ADATIM numeric 9ADTDUE decimal 9ADECDE varchar 2ReportDate smalldatetime 4This is my query to find out the duplicates in the table.select count(*) from dbo.AccountActivitygroup by ADACCT,ADFCDE,ADCCDE,ADATYP,ADCUSR,ADADAT,ADATIM,ADTDUE,ADECDE,ReportDateHAVING count(*) > 1Is there a better way to find out all the duplicate rows in your table? |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2001-11-30 : 15:49:35
|
| In the SQLTeam FAQ, there's a link to this article.-------------------It's a SQL thing... |
 |
|
|
|
|
|