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
 General SQL Server Forums
 New to SQL Server Programming
 Delete Duplicate Data

Author  Topic 

JJins
Yak Posting Veteran

81 Posts

Posted - 2010-10-18 : 11:57:39
How would you right a query to find.....and then one to delete duplicate data you accidently put into the same table. The kicker is column1 (RateID) is unique for all rows and is the PK. But the next five fields have idendical data.


I want to find all rows that have = values for Field2,Field3, Field4,Feild5 with a unique PK (RateID).

All of this is in one table titled DATAID. Can anyone put together a select statement to pull out duplicates, and use the PK and table and fields used in example.

Best,
GG

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-10-18 : 11:59:50
Please don't post same question multiple times.
I have already answered here:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=151712


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -