Register for your free account! | Forgot your password?

You last visited: Today at 20:19

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

Advertisement



ERROR QUERY

Discussion on ERROR QUERY within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2011
Posts: 29
Received Thanks: 4
ERROR QUERY

Hello, someone help me, Run this query and I get this error

ERROR
Msg 195, Level 15, State 10, Line 3
'CONCAT' is not a recognized built-in function name.
Msg 195, Level 15, State 10, Line 11
'CONCAT' is not a recognized built-in function name.
Msg 195, Level 15, State 10, Line 19
'CONCAT' is not a recognized built-in function name.
Msg 195, Level 15, State 10, Line 24
'CONCAT' is not a recognized built-in function name.

Help Please
THEXxmateo is offline  
Old 05/19/2016, 04:31   #2
 
wallerus's Avatar
 
elite*gold: 0
Join Date: Apr 2014
Posts: 300
Received Thanks: 472
From what I can tell, CONCAT is used when you want to join one string with another, which is ok for what you want to do but you are probably better off using the + operator instead, it's simpler. Although not actually present in the script that would most efficiently get the job done.

Code:
-- Character Tags.
USE PS_GameData
UPDATE Chars
SET CharName =
	CASE
	WHEN Family IN (0,1) THEN 'L-*'
	WHEN Family IN (2,3) THEN 'F-*' 
END + CharName

-- Guild Tags.
USE PS_GameData
UPDATE Guilds
SET GuildName =
	CASE
	WHEN Country = 0 THEN 'L-*'
	WHEN Country = 1 THEN 'D-*'
END + GuildName
Credits to Nubness for teaching me more about CASE statements.
wallerus is offline  
Thanks
5 Users
Old 05/19/2016, 04:42   #3
 
elite*gold: 0
Join Date: Jul 2010
Posts: 511
Received Thanks: 513
Code:
'CONCAT' is not a recognized built-in function name.
The CONCAT function requires SQL Server 2012

removed...
sominus is offline  
Thanks
4 Users
Old 05/19/2016, 15:00   #4
 
elite*gold: 0
Join Date: Oct 2011
Posts: 29
Received Thanks: 4
Quote:
Originally Posted by sominus View Post
Code:
'CONCAT' is not a recognized built-in function name.
The CONCAT function requires SQL Server 2012

removed...
Quote:
Originally Posted by wallerus View Post
From what I can tell, CONCAT is used when you want to join one string with another, which is ok for what you want to do but you are probably better off using the + operator instead, it's simpler. Although not actually present in the script that would most efficiently get the job done.

Code:
-- Character Tags.
USE PS_GameData
UPDATE Chars
SET CharName =
	CASE
	WHEN Family IN (0,1) THEN 'L-*'
	WHEN Family IN (2,3) THEN 'F-*' 
END + CharName

-- Guild Tags.
USE PS_GameData
UPDATE Guilds
SET GuildName =
	CASE
	WHEN Country = 0 THEN 'L-*'
	WHEN Country = 1 THEN 'D-*'
END + GuildName
Credits to Nubness for teaching me more about CASE statements.
Thank you so much guys!

---

It lacks the UserMaxGrow the script

sorry for my English
THEXxmateo is offline  
Old 05/19/2016, 23:55   #5
 
wallerus's Avatar
 
elite*gold: 0
Join Date: Apr 2014
Posts: 300
Received Thanks: 472
Do you mean this?
Code:
INNER JOIN PS_GameData.dbo.UserMaxGrow
ON (PS_GameData.dbo.UserMaxGrow.UserUID = PS_GameData.dbo.Chars.UserUID)
WHERE PS_GameData.dbo.UserMaxGrow.Country=1;
If that's what you mean that it is totally unnecessary. This part of the script completely replaces that.
Code:
	CASE
	WHEN Family IN (0,1) THEN 'L-*'
	WHEN Family IN (2,3) THEN 'F-*'
Family IN (0,1) -- (Human,Elf)
Family IN (2,3) -- (Deatheater, Vile)
wallerus is offline  
Thanks
2 Users
Old 05/20/2016, 03:05   #6
 
elite*gold: 0
Join Date: Oct 2011
Posts: 29
Received Thanks: 4
Quote:
Originally Posted by wallerus View Post
Do you mean this?
Code:
INNER JOIN PS_GameData.dbo.UserMaxGrow
ON (PS_GameData.dbo.UserMaxGrow.UserUID = PS_GameData.dbo.Chars.UserUID)
WHERE PS_GameData.dbo.UserMaxGrow.Country=1;
If that's what you mean that it is totally unnecessary. This part of the script completely replaces that.
Code:
	CASE
	WHEN Family IN (0,1) THEN 'L-*'
	WHEN Family IN (2,3) THEN 'F-*'
Family IN (0,1) -- (Human,Elf)
Family IN (2,3) -- (Deatheater, Vile)
Ahh I understand Thanks!
THEXxmateo is offline  
Old 05/20/2016, 13:55   #7
 
MC Flip's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 1,017
Received Thanks: 1,161
Since adding tags is not something you do every day (or at least shouldn't do if you're running a serious server), you can always go the a bit more complex, but still simple, way of achieving this. Simpler than figuring out why pre-made querries don't work for you.

If you want to tag specific characters (eg. GameSages), use this:

Code:
SELECT * FROM PS_GameData.dbo.Chars
WHERE CharName='INSERTCHARNAMEHERE'
This will display you all the characters data in the Chars.dbo, but you will not be able to simply edit the results (you can, with a more advanced querry).
Simply open the Chars.dbo and look for the character you want to edit, based on the CharID or UserID, whichever is easier for you.
MC Flip is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Error in quest lua, query bug?
07/26/2014 - Metin2 Private Server - 4 Replies
Guten abend an alle! Ich habe ein Problem mit einem quest wo ist der fehler in meiner script? quest goodhiu begin state start begin when event1.server_timer begin ga - Pastebin.com mein problem: wenn die mission kommt es auf den punkt, wo er benötigt, von zeile 15 (in quest script 15-20) alle Server schließt...
Item_proto query error
03/07/2014 - Metin2 Private Server - 3 Replies
Hey leute wollt mir eben bei der item_proto neue waffen einfügen dann kommt da so ein fehler hier noch ein bild klk.png - directupload.net Help!
QUERY TO SQL WİTH NAVİCAT ERROR
01/31/2013 - Metin2 Private Server - 4 Replies
video: QUERY TO SQL W i think maybe this error character_set with about my item_proto character set settings: Engine: MyISAM Character set: big--Big5 Traditional Chinese Collation: big5_chinese_ci
Query Error how fix?
10/20/2012 - SRO Private Server - 9 Replies
Virtual Machine (VMWare Player) client System: Windows Server 2008 R2 SR_ShardManager: http://imageshack.us/a/img145/6430/unbenanntgrh.p ng GlobalManager: http://imageshack.us/a/img507/170/unbenannt2ou.pn g
[Help] need help here register query error
01/22/2009 - EO PServer Hosting - 3 Replies
i cant querry my register account it has error when i run the queryy its says Table account.account doesnt exist. anyboby?



All times are GMT +2. The time now is 20:19.


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.