Because this groups by only zone, x, y and z (i.e. not name) it should handle any duplicates that have different trailing names. For example, bat00 and bat01 if at the same zone, x, y and z position will have bat01 deleted (assuming it has the higher id number).
I've run this query and deleted a large portion of the duplicates. As I said in the original post, I only targeted duplicates that are equal to 2. I found alot of instances where there were large groups (> 2) in the same location and I figured these were there for a reason.
There are still other dupes that weren't caught by this however mainly because of the fact (as mollymillions mentioned) that there are duplicated entries with small offsets in the x, y and z directions.
I did this as a temporary fiix until the update comes out. At that time I plan to dump my entire database and source in the new one. So if this deletes anything extra I don't mind at this point.
As far as getting the results of a query to dump to a file, it all depends on which mysql client you are using. I'm using a commercial one that shows me the results in its own window and lets me run the query directly from there.
|