|
Hi Sandeep,
Trying out for a best solution but is giving some error...........
Meanwhile if it is very urgent ........ you can use this .........
ofcourse this is not recommended ..........
CREATE PROCEDURE dbo.PROC_Eliminate_Duplicate_Rows
AS
SET NOCOUNT ON
CREATE TABLE #TBL_Duplicate (EMPNo int, EMPName varchar(50))
INSERT INTO #TBL_Duplicate SELECT DISTINCT * FROM EMP_Duplicate
DELETE EMP_Duplicate
INSERT INTO EMP_Duplicate SELECT * FROM #TBL_Duplicate
SELECT * FROM EMP_Duplicate
RETURN
Regards,
Jagadish Babu
|