bitbucket (7/1/2008)
per rbarryyoung:Except that that is NOT what was wanted. What was wanted was:
Eliminate One row from each distinct Group.
With the Following restrictions:
No intermediate tables!
and
No additional Identity columns
SQL Server 2000 (not 2005)
This will delete all non duplicated entries and the first row of a duplicated entry - leaving all other duplicated rows in the table.
;with numbered as(SELECT rowno=row_number() over
(partition by [your column] order by [your column name] ), [your column name] from [your table] )
delete from numbered where rowno =1
Heh... RTFS! That won't work in SQL Server 2000 as requested!
--Jeff Moden
Change is inevitable... Change for the better is not.