I am having trouble creating a query that will delete duplicate records. It seems to me that this isn't that hard of a query, but I just can't seem to get it working. What I have is a table that has an ID, which should be unique. Unfortunately there have been entries for the same ID where the Total Value row has been increased. What I want to do is delete the records that have the same ID number but the lower total.
Here is one of the sql queries I wrote to try and do this that didn't work...
delete *
FROM x, x AS x_1
where x.id = x_1.id
and x.Total Value > x_1.Total Value
Or x.Total Vale<x_1.Total Value
Any ideas are appreciated
Here is one of the sql queries I wrote to try and do this that didn't work...
delete *
FROM x, x AS x_1
where x.id = x_1.id
and x.Total Value > x_1.Total Value
Or x.Total Vale<x_1.Total Value
Any ideas are appreciated
Comment