Register for your free account! | Forgot your password?

You last visited: Today at 11:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Sql Query help

Discussion on Sql Query help within the Rappelz Private Server forum part of the Rappelz category.

Reply
 
Old   #1
 
Mslolita's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 102
Received Thanks: 4
Exclamation Sql Query help

Hello,

i like to ask for help. to create a sql query to remove unwanted accounts in the database for example

Database Auth= Table Accounts

Field Name:
Account

test
test1
test2
test3
test4
test5

Database Telecaster = Table Characters

Field Name:
Account

test2
test3
test4
test5

i like to run a query to remove all account records in Database Auth except if they exist in the Database Table characters (Field name Account)

in this case it should remove test and test 1 and keep test2/3/4/5 in both
if there is anyone that is able to help me it would be great!
Mslolita is offline  
Old 01/17/2014, 20:34   #2
 
malaysiawap's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 39
Received Thanks: 49
this is just example delete the name value LIKE 'test'

SELECT * FROM [Auth].[dbo].[Account] WHERE account LIKE '%test%'

if value to delete exists, just run the query below

DELETE FROM [Auth].[dbo].[Account] WHERE account LIKE '%test%'

do same for character..

and here some query code to remove the deleted char.

SELECT * FROM [Telecaster].[dbo].[Character] WHERE name LIKE '%@%'

DELETE FROM [Telecaster].[dbo].[Character] WHERE name LIKE '%test%'
malaysiawap is offline  
Thanks
1 User
Old 01/17/2014, 21:19   #3
Moderator


 
ThunderNikk's Avatar
 
elite*gold: 1
Join Date: Dec 2012
Posts: 4,779
Received Thanks: 1,461
That's nice but it will delete all accounts with 'test' in the name regardless if there are created characters or not.

So if someone created an account named 'johnnytest' it will be deleted.

I think the OP wants to delete all accounts that never created a character.
ThunderNikk is offline  
Old 01/17/2014, 23:04   #4
 
TheSuperKiller's Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 278
Received Thanks: 73
use auth delete from accounts where account_id not in (select account_id from telecaster.dbo.Character)
TheSuperKiller is offline  
Thanks
1 User
Old 01/18/2014, 01:14   #5
 
Mslolita's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 102
Received Thanks: 4
Thank you very much!

Quote:
Originally Posted by TheSuperKiller View Post
use auth delete from accounts where account_id not in (select account_id from telecaster.dbo.Character)
Mslolita is offline  
Reply


Similar Threads Similar Threads
Query
04/08/2013 - Metin2 Private Server - 1 Replies
Hey leute :) Wollte fragen ob jemand ein TuT oder die Query von den rüssis hat wie man die einfügt. :D & ihr braucht jetzt nicht kommen machs selber! http://www.elitepvpers.com/forum/metin2-pserver-g uides-strategies/1852706-armor-release-armor-all-c haracters.html
Query
02/15/2012 - Metin2 Private Server - 1 Replies
woher bekommt man die Query von einer waffe?
[Suche]Query für "Alteklinge, Reichsklinge" &' Stichdolche NUR QUERY!
08/18/2010 - Metin2 Private Server - 1 Replies
Ich weiß ich werd nervig aber ich suche die Query's für Alteklinge, Reichsklinge &' Strichdolche Why? Naya, weil ich in der DB i-wie nur Drachenmaulglocke hab ... not more -.- Auf jeden Fall Icon's etc. etc. etc. hab ich ich brauche nur die Query's
A Query
03/02/2010 - 12Sky2 - 6 Replies
Hi, First off, i'm an addict for 12sky 2. I play both 12sky 2 PH and 12sky 2 aeria. All the hax i find here for aeria server has been very helpful. Apparently, things are quite the opposite for 12sky2 ph server since we have Xtrap. So hacking is quite impossible for PH. Lately there has been major issues in PH server like some people using cheats/hacks. Fact is, there are already people banned in PH server for using hax. Anyway, been trying to find a way to hack 12sky 2 ph server but...



All times are GMT +2. The time now is 11:49.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.