Register for your free account! | Forgot your password?

You last visited: Today at 18:48

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


ERROR QUERY

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2011
Posts: 21
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
 
elite*gold: 0
Join Date: Apr 2014
Posts: 300
Received Thanks: 450
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: 406
Received Thanks: 401
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: 21
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
 
elite*gold: 0
Join Date: Apr 2014
Posts: 300
Received Thanks: 450
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: 21
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
 
elite*gold: 0
Join Date: Apr 2009
Posts: 982
Received Thanks: 1,123
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



« Ps_game crash (Nub.dll) | Shaiya wings for Ep5.4 »

Similar Threads
Error in quest lua, query bug?
07/26/2014 - Metin2 PServer - Discussions / Questions - 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...
Item_proto query error
03/07/2014 - Metin2 PServer - Discussions / Questions - 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 PServer - Discussions / Questions - 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 PServer Ask the Experts - 9 Replies
Virtual Machine (VMWare Player) client System: Windows Server 2008 R2 SR_ShardManager: http://imageshack.us/a/img145/6430/unbenanntgrh.png GlobalManager: http://imageshack.us/a/img507/170/unbenannt2ou.png
[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 18:48.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.