Shivkumar's Blog
Thursday, June 21, 2012
Query to Find Duplicate Rows from TABLE - SQL SERVER
SELECT Office_Name , DUPCOUNT FROM (
SELECT OFFICE_NAME , ROW_NUMBER() OVER (PARTITION BY OFFICE_NAME ORDER BY OFFICE_NAME) AS DUPCOUNT FROM Mast_Office ) OBJ
WHERE OBJ.DUPCOUNT > 1
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment