[DiscordArchive] Hello, is there a way to find and delete duplic...
[DiscordArchive] Hello, is there a way to find and delete duplic...
Archived author: Needle • Posted: 2025-09-13T18:35:20.571000+00:00
Original source
Archived author: Needle • Posted: 2025-09-13T18:35:21.090000+00:00
Original source
Thread automatically created by Lordthunder in <#415944535718494208>
Archived author: Conastro • Posted: 2025-09-13T19:01:49.759000+00:00
Original source
So you want a sql script to delete all rows where displayid is more than once in the table?
Archived author: Lordthunder • Posted: 2025-09-13T19:06:50.974000+00:00
Original source
Yes, right, for example, the numbers 5677 appear 4 times, so he only keeps one and deletes the rest. I have a lot of duplicate entries in there. I want to sort them all out so that there are no duplicates. Sorry, I can't explain that well.
Archived author: Hawjiki • Posted: 2025-09-13T19:14:23.614000+00:00
Original source
```
SELECT a.entry, a.name, a.displayid, COUNT(*) OVER (PARTITION BY a.displayid) AS duplicate_count
FROM item_template a
WHERE a.displayid IN (SELECT displayid FROM item_template GROUP BY displayid HAVING COUNT(*) > 1)
ORDER BY a.displayid, a.name;
```
This will show you a list of every dupe within Item_template of the same displayid.
Archived author: Hawjiki • Posted: 2025-09-13T19:16:21.342000+00:00
Original source
Not entirely sure what your end goal is but i wouldn't recommend deleting every dupe from one query. Some items, such as quest items will have the same ids and are need for well questing. So if you do end up doing mass deleting restrict it to using only weapon and armors. Class, Subclass, and InventoryType should define your deletion query.
Archived author: Lordthunder • Posted: 2025-09-13T19:24:34.137000+00:00
Original source
I'm trying to add all weapons and equipment from Mists of Pandaria to Woltk 335 and want to avoid duplicate items and displays.
Archived author: Lordthunder • Posted: 2025-09-13T19:26:38.888000+00:00
Original source
I have inserted all items but I have many duplicate display IDs so I ask
Archived author: Lordthunder • Posted: 2025-09-13T19:27:09.396000+00:00
Original source
Thank you for the help Thank you
Archived author: Hawjiki • Posted: 2025-09-13T19:30:54.138000+00:00
Original source
No problem. The last item in WOTLK is 56806. So any entry you got beyond that is cata plus. Hope that helps you narrow down any possible dupes.