I am a starter in SQl and the problems faced by me while working is published in this web page.
Sunday, September 9, 2012
REMOVE DUPLICATE ROW FROM SQL 2005
WITH CTE (FIELDNAME, DuplicateCount) AS ( SELECT
FIELDNAME , ROW_NUMBER() OVER(PARTITION BY
FIELDNAME ORDER BY
FIELDNAME ) AS DuplicateCount FROM TABLENAME ) DELETE FROM CTE WHERE DuplicateCount > 1 GO
No comments:
Post a Comment