EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   [Help] Query to replace just one character... (https://www.eqemulator.org/forums/showthread.php?t=41462)

Fridgecritter 08-02-2017 11:25 AM

[Help] Query to replace just one character...
 
I've been in the mysql docs online and asked a few people, but can't seem to get this right running it on my sample database. But I know one of you is a wiz at this and knows the answer off the top of your head.

I need to run a query on the items database, in the name field, that changes all of the apostrophes (') to acute accents (`). I tried RNAME and NAME LIKE, but I am getting my syntax wrong somewhere.

Maybe: UPDATE items SET name = (REPLACE(caption,''','`''));

But I know something's wrong with my formatting.

Thanks a ton in advance.

Fridgecritter 08-02-2017 11:36 AM

Tried UPDATE items SET name = REPLACE(name,''','`');

Didn't work either.

Fridgecritter 08-02-2017 12:03 PM

SOLVED

I was using ' ' instead of quotation marks to designate the character to replace (" "). Here is the query I ran on the database to replace all of the apostrophes with acute accents:

Code:

UPDATE items SET name = REPLACE(name,"'","`");


All times are GMT -4. The time now is 03:48 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.