[SQL] Unable to get a query to work menu

User Tag List

Results 1 to 12 of 12
  1. #1
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    [SQL] Unable to get a query to work

    Thanks for taking the time to look at this question, I'll get straight into it:

    Code:
    DELETE FROM `gameobject_spawns` WHERE `entry` = (SELECT `entry` FROM `gameobject_names` WHERE `type` = '3');
    Is what I am trying to do (delete from gameoject_spawns where the type in gameobject_names is = 3) but it is telling me:

    Code:
    Error Code : 1242
    Subquery returns more than 1 row
    
    Execution Time : 00:00:00:000
    Transfer Time  : 00:00:00:000
    Total Time     : 00:00:00:000
    
    Error Code : 1242
    Subquery returns more than 1 row
    
    Execution Time : 00:00:00:000
    Transfer Time  : 00:00:00:000
    Total Time     : 00:00:00:000
    Thanks.

    [SQL] Unable to get a query to work
  2. #2
    sasoritail's Avatar Contributor
    Reputation
    161
    Join Date
    Sep 2008
    Posts
    655
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont see any problems with the SQL Query.
    What DataBase Editor are you using?
    It's been a while

  3. #3
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    SQLyog Community Edition latest stable version, I was talking to somebody and he said there are a lot entrys and one query can not handle them all, although he doesn't know how to fix which is why I came here.

  4. #4
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Stone, Ill send you NaviCat Premium over msn.

  5. #5
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Still failed using Navicat premium.

    EDIT:

    Executed:

    Code:
    DELETE FROM `gameobject_names` WHERE `type` = '3';
    DELETE FROM `gameobject_spawns` WHERE `entry` NOT IN (SELECT `entry` FROM `gameobject_names`);
    Which is a solution that works, but I would like to know how to get the original query working if anyone knows.
    Last edited by stoneharry; 11-16-2009 at 12:42 PM.

  6. #6
    sasoritail's Avatar Contributor
    Reputation
    161
    Join Date
    Sep 2008
    Posts
    655
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You sure you got a Gobject with the entry: 3 ?
    It's been a while

  7. #7
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by sasoritail View Post
    You sure you got a Gobject with the entry: 3 ?
    Not entry, type. Type 3 = Chests and veins etc. I'm trying to delete from gameobject_Spawns where the type in gameobject_names is 3.

  8. #8
    sasoritail's Avatar Contributor
    Reputation
    161
    Join Date
    Sep 2008
    Posts
    655
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh ye... Well I'm Not Sure Why It Wont Work. Cant Help You Anymore.
    Sorry
    It's been a while

  9. #9
    Dynashock's Avatar Contributor

    Reputation
    176
    Join Date
    Nov 2007
    Posts
    203
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use:

    Code:
    DELETE FROM `gameobject_spawns` WHERE `entry` IN (SELECT `entry` FROM `gameobject_names` WHERE `type` = '3');

  10. #10
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I wuv you Dynashock <3

  11. #11
    sasoritail's Avatar Contributor
    Reputation
    161
    Join Date
    Sep 2008
    Posts
    655
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmm i tested the Query you posted Stone and Dynashock's.... both worked for me on HeidiSQL.
    I dont know whats wrong but your problem is solved so... yay
    It's been a while

  12. #12
    Vision1000's Avatar Member
    Reputation
    104
    Join Date
    Jun 2008
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And all this time I thought stoneharry only answered questions.

    =P

Similar Threads

  1. Can't get skin swap to work
    By homer_3 in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 04-05-2007, 08:38 PM
  2. Cant get my sig to work
    By Wesk. in forum Art & Graphic Design
    Replies: 2
    Last Post: 02-18-2007, 05:22 PM
  3. Tool to get all Fish/bots working for EU version users! [self-made]
    By -MadMax- in forum World of Warcraft Bots and Programs
    Replies: 6
    Last Post: 09-08-2006, 09:02 AM
  4. Get invisible in SW, WORKS FOR HORDE TOO
    By fasck in forum World of Warcraft Exploits
    Replies: 28
    Last Post: 08-13-2006, 06:46 PM
  5. New dupe *get it while it works*
    By KuRIoS in forum World of Warcraft Exploits
    Replies: 59
    Last Post: 07-21-2006, 10:20 AM
All times are GMT -5. The time now is 06:18 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search