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 |
|
laddu
Constraint Violating Yak Guru
332 Posts |
Posted - 2009-07-07 : 16:56:01
|
| I am new to T-SQL. How to find a only duplicate rows in a table. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-07-07 : 17:12:13
|
Using which version of SQL Server? N 56°04'39.26"E 12°55'05.63" |
 |
|
|
laddu
Constraint Violating Yak Guru
332 Posts |
Posted - 2009-07-07 : 17:15:42
|
| SQL Server 2005 |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-07-07 : 17:23:49
|
SELECT *FROM (SELECT *, ROW_NUMBER() OVER (PARTITION BY Col1 ORDER BY Col2) AS recID) AS dWHERE recID > 1 N 56°04'39.26"E 12°55'05.63" |
 |
|
|
laddu
Constraint Violating Yak Guru
332 Posts |
Posted - 2009-07-08 : 12:34:45
|
| Thanks Peso!Lets say I have a table1column1 column21 a2 b3 c4 a5 b6 dI need a query for below O/Pcolumn1 column21 a4 a2 b5 b |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-07-08 : 12:40:11
|
| [code]SELECT column1,column2(SELECT COUNT(column1 ) OVER (PARTITION BY column2) AS Occurance, column1,column2FROM YourTable)tWHERE Occurance>1[/code] |
 |
|
|
|
|
|