[10726] Correct one SQL in tools, table was renamed.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-11-16 08:53:44 +01:00
parent 6e1605caef
commit f5e40a5fda
2 changed files with 3 additions and 3 deletions

View file

@ -3,7 +3,7 @@ CREATE TABLE item_test
SELECT w.`item_guid`,w.`source`,w.`count` FROM
(SELECT u.`item_guid`,u.`source`,COUNT(u.`item_guid`) as `count` FROM
((SELECT c.`item` as `item_guid`, 'i' as `source` FROM character_inventory c) UNION
(SELECT a.`itemguid` as `item_guid`, 'a' as `source` FROM auctionhouse a) UNION
(SELECT a.`itemguid` as `item_guid`, 'a' as `source` FROM auction a) UNION
(SELECT m.`item_guid` as `item_guid`, 'm' as `source` FROM mail_items m) UNION
(SELECT g.`item_guid` as `item_guid`, 'g' as `source` FROM guild_bank_item g)
) as u
@ -11,7 +11,7 @@ SELECT w.`item_guid`,w.`source`,w.`count` FROM
) as w
WHERE w.`count` > 1;
DELETE FROM auctionhouse WHERE itemguid IN (SELECT item_guid FROM item_test WHERE `source`='i');
DELETE FROM auction WHERE itemguid IN (SELECT item_guid FROM item_test WHERE `source`='i');
DELETE FROM mail_items WHERE item_guid IN (SELECT item_guid FROM item_test WHERE `source`='i');
DELETE FROM guild_bank_item WHERE item_guid IN (SELECT item_guid FROM item_test WHERE `source`='i');