MySQL Forums
Forum List  »  Newbie

Update with REPLACE doesn't work as expected
Posted by: Martin Ascheid
Date: March 11, 2018 01:37PM

Hi!

I have data in the column "post_title" like: "Geld Für Projekte". I need to replace the word "Für" with the smallcaps version "für" everywhere in this column, where the data doesn't begin with this word.

When selecting all occurrences with the following statement, I get the expected results:

SELECT * FROM `posts` WHERE BINARY post_title LIKE ('% Für %')

However, when I try to replace the words, nothing happens (the result set is empty):

UPDATE `posts` SET post_title = REPLACE( post_title, ' Für ', ' für ' ) ;

What am I doing wrong?

Options: ReplyQuote


Subject
Written By
Posted
Update with REPLACE doesn't work as expected
March 11, 2018 01:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.