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 |
Vack
Aged Yak Warrior
530 Posts |
Posted - 2008-09-06 : 11:46:53
|
Now is just want to delete duplicate records where all fields are hte sametable: orderrebatefields; ord_typeord_no,item_no,line_seq_no,cd_tp |
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-09-06 : 12:05:11
|
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=110167 |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-09-06 : 15:05:46
|
DELETE fFROM (SELECT ROW_NUMBER() OVER (PARITION BY ord_type, ord_no, item_no, lin_seq_no ORDER BY cd_tp) AS RecID) AS fWHERE RecID > 1 E 12°55'05.63"N 56°04'39.26" |
 |
|
ashishashish
Constraint Violating Yak Guru
408 Posts |
Posted - 2008-09-13 : 02:48:04
|
Hi..If all the values and fields n same in your database than u just add one more column to your table named ID or Something Like that n turn on the identity for that column so,,,,,this field is diff. now u can easily delete records duplicate |
 |
|
|
|
|