Advertisement
tok124

sql query donor gear

Nov 8th, 2017
110
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SET
  2. @head = " Donor Head",
  3. @shoulder = " Donor Shoulder",
  4. @chest = " Donor Chest",
  5. @legs = " Donor Legs",
  6. @gloves = " Donor Gloves";
  7. SELECT
  8. entry,
  9. class,
  10. CASE AllowableClass
  11.     WHEN 1 THEN
  12.         CASE InventoryType
  13.             WHEN 1 THEN CONCAT ("Warrior", @head)
  14.             WHEN 3 THEN CONCAT ("Warrior", @shoulder)
  15.             WHEN 5 THEN CONCAT ("Warrior", @chest)
  16.             WHEN 7 THEN CONCAT ("Warrior", @legs)
  17.             WHEN 10 THEN CONCAT ("Warrior", @gloves)
  18.             WHEN 20 THEN CONCAT ("Warrior", @chest)
  19.         END
  20.     WHEN 2 THEN
  21.         CASE InventoryType
  22.             WHEN 1 THEN CONCAT ("Paladin", @head)
  23.             WHEN 3 THEN CONCAT ("Paladin", @shoulder)
  24.             WHEN 5 THEN CONCAT ("Paladin", @chest)
  25.             WHEN 7 THEN CONCAT ("Paladin", @legs)
  26.             WHEN 10 THEN CONCAT ("Paladin", @gloves)
  27.             WHEN 20 THEN CONCAT ("Paladin", @chest)
  28.         END
  29.     WHEN 4 THEN
  30.         CASE InventoryType
  31.             WHEN 1 THEN CONCAT ("Hunter", @head)
  32.             WHEN 3 THEN CONCAT ("Hunter", @shoulder)
  33.             WHEN 5 THEN CONCAT ("Hunter", @chest)
  34.             WHEN 7 THEN CONCAT ("Hunter", @legs)
  35.             WHEN 10 THEN CONCAT ("Hunter", @gloves)
  36.             WHEN 20 THEN CONCAT ("Hunter", @chest)
  37.         END
  38.     WHEN 8 THEN
  39.         CASE InventoryType
  40.             WHEN 1 THEN CONCAT ("Rogue", @head)
  41.             WHEN 3 THEN CONCAT ("Rogue", @shoulder)
  42.             WHEN 5 THEN CONCAT ("Rogue", @chest)
  43.             WHEN 7 THEN CONCAT ("Rogue", @legs)
  44.             WHEN 10 THEN CONCAT ("Rogue", @gloves)
  45.             WHEN 20 THEN CONCAT ("Rogue", @chest)
  46.         END
  47.     WHEN 16 THEN
  48.         CASE InventoryType
  49.             WHEN 1 THEN CONCAT ("Priest", @head)
  50.             WHEN 3 THEN CONCAT ("Priest", @shoulder)
  51.             WHEN 5 THEN CONCAT ("Priest", @chest)
  52.             WHEN 7 THEN CONCAT ("Priest", @legs)
  53.             WHEN 10 THEN CONCAT ("Priest", @gloves)
  54.             WHEN 20 THEN CONCAT ("Priest", @chest)
  55.         END
  56.     WHEN 32 THEN
  57.         CASE InventoryType
  58.             WHEN 1 THEN CONCAT ("Death Knight", @head)
  59.             WHEN 3 THEN CONCAT ("Death Knight", @shoulder)
  60.             WHEN 5 THEN CONCAT ("Death Knight", @chest)
  61.             WHEN 7 THEN CONCAT ("Death Knight", @legs)
  62.             WHEN 10 THEN CONCAT ("Death Knight", @gloves)
  63.             WHEN 20 THEN CONCAT ("Death Knight", @chest)
  64.         END
  65.     WHEN 64 THEN
  66.         CASE InventoryType
  67.             WHEN 1 THEN CONCAT ("Shaman", @head)
  68.             WHEN 3 THEN CONCAT ("Shaman", @shoulder)
  69.             WHEN 5 THEN CONCAT ("Shaman", @chest)
  70.             WHEN 7 THEN CONCAT ("Shaman", @legs)
  71.             WHEN 10 THEN CONCAT ("Shaman", @gloves)
  72.             WHEN 20 THEN CONCAT ("Shaman", @chest)
  73.         END
  74.     WHEN 128 THEN
  75.         CASE InventoryType
  76.             WHEN 1 THEN CONCAT ("Mage", @head)
  77.             WHEN 3 THEN CONCAT ("Mage", @shoulder)
  78.             WHEN 5 THEN CONCAT ("Mage", @chest)
  79.             WHEN 7 THEN CONCAT ("Mage", @legs)
  80.             WHEN 10 THEN CONCAT ("Mage", @gloves)
  81.             WHEN 20 THEN CONCAT ("Mage", @chest)
  82.         END
  83.     WHEN 256 THEN
  84.         CASE InventoryType
  85.             WHEN 1 THEN CONCAT ("Warlock", @head)
  86.             WHEN 3 THEN CONCAT ("Warlock", @shoulder)
  87.             WHEN 5 THEN CONCAT ("Warlock", @chest)
  88.             WHEN 7 THEN CONCAT ("Warlock", @legs)
  89.             WHEN 10 THEN CONCAT ("Warlock", @gloves)
  90.             WHEN 20 THEN CONCAT ("Warlock", @chest)
  91.         END
  92.     WHEN 1024 THEN
  93.         CASE InventoryType
  94.             WHEN 1 THEN CONCAT ("Druid", @head)
  95.             WHEN 3 THEN CONCAT ("Druid", @shoulder)
  96.             WHEN 5 THEN CONCAT ("Druid", @chest)
  97.             WHEN 7 THEN CONCAT ("Druid", @legs)
  98.             WHEN 10 THEN CONCAT ("Druid", @gloves)
  99.             WHEN 20 THEN CONCAT ("Druid", @chest)
  100.         END
  101. END AS name,
  102. displayid,
  103. allowableclass,
  104. inventorytype
  105. FROM item_template WHERE name LIKE "sanctified%" AND inventorytype > 0 AND itemlevel = 264;
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement