Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Delete duplicate record

Author  Topic 

kim12345
Starting Member

5 Posts

Posted - 2008-08-07 : 09:26:29
how to delete the duplicate record..?

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-08-07 : 09:30:30
not really descriptive enough for anyone to do anything other than guess at your situation

Em
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-07 : 11:20:15
[code]DELETE t
FROM
(SELECT ROW_NUMBER() OVER(PARTITION BY DuplicateColumn ORDER BY Identitycolumn) AS Seq,
*
FROM YourTable)t
WHERE t.Seq>1[/code]
Go to Top of Page
   

- Advertisement -