June 11, 2007
-
SQL to identify duplicates
SELECT duplicatecolumn, count(duplicatecolumn) as number
FROM table
where isnull(duplicatecolumn,'')<>''
GROUP BY duplicatecolumn
HAVING COUNT(*) > 1
order by number
SELECT duplicatecolumn, count(duplicatecolumn) as number
FROM table
where isnull(duplicatecolumn,'')<>''
GROUP BY duplicatecolumn
HAVING COUNT(*) > 1
order by number
Comments (3)
Dear, has it really come to this?
Haha
Very graceful and elegant, I like.
Now you need to start looking at running webservices from stored procedures on Sql Server 2005 via http.sys It's geeky but it rocks!