SQL UPDATE command menu

User Tag List

Results 1 to 5 of 5
  1. #1
    volitle's Avatar Contributor
    Reputation
    181
    Join Date
    Nov 2007
    Posts
    1,127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SQL UPDATE command

    ok the thing is if i use the regular on item one line thing i will have to do it just over 3 thousand times so i was wondering if there is a way to shorten this by updating more then one thing at a time like i have tried this and no luck

    Code:
    UPDATE vendors SET extended_cost = 2 WHERE item = '33203','33471','32340','32341','32570','32573','32608','33357','31329','33283','20648','22679','28670','30050','30894','32239','32250','32263','32271','32280'
    anyone got a way of doing this or not?


    SQL UPDATE command
  2. #2
    Vindicated's Avatar Contributor
    Reputation
    226
    Join Date
    Aug 2008
    Posts
    1,067
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use an "OR" statement.

    UPDATE vendors SET extended_cost = 2 WHERE item = 33203 OR 33471 OR ect....


  3. #3
    volitle's Avatar Contributor
    Reputation
    181
    Join Date
    Nov 2007
    Posts
    1,127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Vindicated View Post
    Use an "OR" statement.

    UPDATE vendors SET extended_cost = 2 WHERE item = 33203 OR 33471 OR ect....
    ah thanks man never thought of that lol


  4. #4
    waymirec's Avatar Member
    Reputation
    49
    Join Date
    Jan 2008
    Posts
    155
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    much easier/efficient to use an IN clause such as

    Code:
    UPDATE vendors SET extended_cost=2 WHERE item IN (33203,33471,32340);

  5. #5
    volitle's Avatar Contributor
    Reputation
    181
    Join Date
    Nov 2007
    Posts
    1,127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by waymirec View Post
    much easier/efficient to use an IN clause such as

    Code:
    UPDATE vendors SET extended_cost=2 WHERE item IN (33203,33471,32340);
    lol so i was like 2 things of xD great +rep for the suggestion aswell


Similar Threads

  1. {Request}Family Reputation Sql Update
    By brock106 in forum WoW EMU Questions & Requests
    Replies: 0
    Last Post: 12-29-2008, 11:23 PM
  2. Updated Open Ascent Core Compiles : 2 Hours: SQL Updates : Daily : ABD Download.
    By Ickybad in forum World of Warcraft Emulator Servers
    Replies: 39
    Last Post: 06-18-2008, 10:34 AM
  3. [GUIDE] Fix on Quest bug [If sql updates didnt work]!
    By Laniax in forum WoW EMU Guides & Tutorials
    Replies: 1
    Last Post: 03-22-2008, 04:20 PM
  4. SQL UPDATES for 2.1-2.3
    By sadgonewild in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 11-23-2007, 07:05 AM
  5. Handy: Update SQL, List of all the needed SQL updates since Antrix
    By [Shon3m] in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 10-28-2007, 06:21 PM
All times are GMT -5. The time now is 06:45 AM. 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