Hay guys, I need some help dedupeing a table.I am adding to a dupe table like soinsert into cash_dupes (full_name,first_name, last_name, address, city, state, zip, year, make, model, flag)select full_name, first_name, last_name, address, city, state, zip, year, make, model, flag = 1 from cash_data_hold group by full_name, first_name, last_name, address, city, state, zip, year, make, model having count(*) > 1
then I can find the dupes in the existing table like so select * from cash_data_hold c inner join cash_dupes d on d.full_name = c.full_name and d.first_name = c.first_name and d.last_name = c.last_name and d.address = c.address and d.city = c.city and d.state = c.state and d.zip = c.zip and d.year = c.year and d.make = c.make and d.model = c.model
My question is how to delete the max row id in the original table.The original table has a identity column named record_id and I want to delete the max record_id.Any help would be greatly appreciated!