Link to home
Start Free TrialLog in
Avatar of darkmooink
darkmooinkFlag for United Kingdom of Great Britain and Northern Ireland

asked on

how do you remove duplicate records? (mssql)

i have a 70,000 record table but i think it should only have 35,000 because all of the records i looked at (when in id order) has a twin underneath it. is there an easy way of removing one of the records but keeping the other?
the only way i can think of doing it is to delete them both and then insert one again.
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

is there any column that you can use to distinguish the 2 records?
if yes: it's easy
if not: it will not be straightforward...
Avatar of darkmooink

ASKER

no they are identical, there is no unique identifier
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thankyou aneeshattingal that would have worked (i tryed it on test data) but i did something that deleted the whole table's data.  we should have the data somewhere else so it will hopefully only be missing for a week and a half till my manager gets back and finds the data again.