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.
| Author |
Topic |
|
NewToSQLserver
Starting Member
6 Posts |
Posted - 2011-01-01 : 07:44:20
|
| Does anybody knows the sql code to check for Duplicate rows?Any help is appreciated! |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-01-01 : 08:09:04
|
Yes, there are a number of differenf approaches depending on what you want to achieve.DELETE fFROM ( SELECT ROW_NUMBER() OVER (PARTITION BY CustomerID ORDER BY StatusDate DESC) AS RecID FROM dbo.Table1 ) AS fWHERE RecID > 1 N 56°04'39.26"E 12°55'05.63" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-01-04 : 12:48:49
|
| what according to you represent a duplicate?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|