TO Eliminate Duplicate Data From Duplicate Table????????

Posted by Sabarimahesh under Sql Server category on | Points: 40 | Views : 1105
To Find
WITH Temporary_table (Empid,Sub_id, Count_Duplicate)
SELECT Empid,Sub_id,ROW_NUMBER() OVER(PARTITION BY Empid,Sub_id ORDER BY Empid) AS Count_Duplicate FROM Emp_table

To Eliminate
DELETE FROM Temporary_table WHERE Count_Duplicate > 1

Comments or Responses

Login to post response