View Single Post

  #2 (permalink)  
Old 04-22-2008, 03:21 AM
jagadishbabub jagadishbabub is offline
Junior Member
 
Join Date: Apr 2008
Posts: 7
jagadishbabub is on a distinguished road
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
Reply With Quote