Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-18-2014, 02:52 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default Mysql Query Help, Spell Merging.

Hello all,

I dont know if you guys offer any help on sql queries but If so, I could use some! I have tried and tried but cannot figure it out.

What I am trying to accomplish is copying info from my old spell_new to the new spell_new from the latest peqbeta.sql

I have renamed my spell table to spell_old and the new is obviously spell_new.
I am doing this because I have changed values like spell levels and am wanting to start with a new table with fresh changed. So the query I am looking for is match this column of tableA with tableB and if match, merge info, If it doesnt match then do nothing. I got it to sorda work once and anything that matched merged fine but anything that didnt match got turned to 0 value.

This is the one that worked but changed unmatching to 0, which i need to fix.
Code:
UPDATE spells_new 
SET spells_new.classes14 = (
    SELECT spells_old.classes14
    FROM spells_old
    WHERE spells_old.name = spells_new.name LIMIT 1
);

This is 1 i am playing around, dont know exactly if INNER JOIN is what i need but still trying.
Code:
SELECT name
FROM spells_old
INNER JOIN spells_old.classes1 ON spells_new.name = spells_old.name;
Thanks guys!

Fig
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:41 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3