View Single Post
  #42  
Old 01-05-2004, 08:07 AM
Shawn319
Demi-God
 
Join Date: Jan 2002
Posts: 2,073
Default

[quote=mollymillions]There are a lot of duplicated spawns in the DB, they may be intentional but I wanted to get rid of them. e.g.

SELECT zone, x, y, z, left(npc_types.name,32) AS Name, count(spawn2.id) AS SpawnCount
FROM spawn2, spawnentry, npc_types
WHERE spawn2.spawngroupID = spawnentry.spawngroupID
AND spawnentry.npcID = npc_types.ID
AND spawn2.pathgrid = 0
GROUP by zone, x, y, z, npc_types.name
HAVING SpawnCount > 1
ORDER BY zone, x, y, z, npc_types.name

Here's a query to construct a query to delete the last spawn added for each replicated spawn (i didn
__________________
Shawn319
Semi-Retired EQ Addict

(Retired)EQEmu Lead Tester
(Retired)EQEmu Tech Support

(Retired)Host/ServerOP - [LIVE] Official EQEmu Test Server
(Retired)Host/ServerOP - Shawn319's All-GM Dev Test Server
(Retired)ServerOP - EQEmu Beta Server
(Retired)ServerOP - GuildWars Server
(Retired)ServerOP - Raid Addicts
--------------------------
Reply With Quote