Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-25-2009, 03:14 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

I'm sure the syntax is 100% correct, but you should be able to do something like this:

Code:
DELETE FROM items 
	WHERE id NOT IN (
		(SELECT components1 FROM spells_new WHERE components1 > 1000), 
		(SELECT components2 FROM spells_new WHERE components2 > 1000), 
		(SELECT components3 FROM spells_new WHERE components3 > 1000), 
		(SELECT components4 FROM spells_new WHERE components4 > 1000), 
		(SELECT NoexpendReagent1 FROM spells_new WHERE NoexpendReagent1 > 1000), 
		(SELECT NoexpendReagent2 FROM spells_new WHERE NoexpendReagent2 > 1000), 
		(SELECT NoexpendReagent3 FROM spells_new WHERE NoexpendReagent3 > 1000), 
		(SELECT NoexpendReagent4 FROM spells_new WHERE NoexpendReagent4 > 1000)
	)
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #2  
Old 08-25-2009, 11:51 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Quote:
Originally Posted by AndMetal View Post
I'm sure the syntax is 100% correct, but you should be able to do something like this:

Code:
DELETE FROM items 
	WHERE id NOT IN (
		(SELECT components1 FROM spells_new WHERE components1 > 1000), 
		(SELECT components2 FROM spells_new WHERE components2 > 1000), 
		(SELECT components3 FROM spells_new WHERE components3 > 1000), 
		(SELECT components4 FROM spells_new WHERE components4 > 1000), 
		(SELECT NoexpendReagent1 FROM spells_new WHERE NoexpendReagent1 > 1000), 
		(SELECT NoexpendReagent2 FROM spells_new WHERE NoexpendReagent2 > 1000), 
		(SELECT NoexpendReagent3 FROM spells_new WHERE NoexpendReagent3 > 1000), 
		(SELECT NoexpendReagent4 FROM spells_new WHERE NoexpendReagent4 > 1000)
	)
effect_base_value1, 2, 3, and 4 are also used, to summon items I believe.
Reply With Quote
  #3  
Old 08-25-2009, 03:09 PM
Shadow-Wolf
Dragon
 
Join Date: Oct 2003
Posts: 511
Talking

Quote:
Originally Posted by AndMetal View Post
I'm sure the syntax is 100% correct, but you should be able to do something like this:

Code:
DELETE FROM items 
	WHERE id NOT IN (
		(SELECT components1 FROM spells_new WHERE components1 > 1000), 
		(SELECT components2 FROM spells_new WHERE components2 > 1000), 
		(SELECT components3 FROM spells_new WHERE components3 > 1000), 
		(SELECT components4 FROM spells_new WHERE components4 > 1000), 
		(SELECT NoexpendReagent1 FROM spells_new WHERE NoexpendReagent1 > 1000), 
		(SELECT NoexpendReagent2 FROM spells_new WHERE NoexpendReagent2 > 1000), 
		(SELECT NoexpendReagent3 FROM spells_new WHERE NoexpendReagent3 > 1000), 
		(SELECT NoexpendReagent4 FROM spells_new WHERE NoexpendReagent4 > 1000)
	)
With a little modification adding the fields Cavedude specified this will give me exactly what I needed. Thank you everyone for your help!
__________________
How about the power to kill a yak from 200 yards away...WITH MIND BULLETS! thats telekinesis kyle.
Reply With Quote
  #4  
Old 08-25-2009, 06:30 PM
Shadow-Wolf
Dragon
 
Join Date: Oct 2003
Posts: 511
Default

Hmm, while the syntax throws no errors there is something wrong with the statements logic as it deletes no items at all, looking into it.

Edit - When running this through an sql validator I get this

The following feature outside Core SQL-200x (draft) is used:
F561, "Full value expressions""
__________________
How about the power to kill a yak from 200 yards away...WITH MIND BULLETS! thats telekinesis kyle.
Reply With Quote
Reply

Thread Tools
Display Modes

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 11:33 PM.


 

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