I have sentences in one a Column of the mySQl, I need to search fro the words that are all uppercase (for example "My WORD") and change them to first letter Capital (for example "My Word")
I have tried the following from other questions in Stackoverflow, but non of them works When I use
UPDATE [yourtable]
SET word=UPPER(LEFT(word,1))+LOWER(SUBSTRING(word,2,LEN(word)))
I get
"Databasename.LEN does not exist"
and when I use
UPDATE [yourtable]
SET word=UPPER(LEFT(word,1))+LOWER(SUBSTRING(word,2));
OR
UPDATE [yourtable]
SET word=UPPER(LEFT(word,1))+LOWER(SUBSTRING(word,2,LENGTH(word)))
It changes my column value to all "0"s and "1"s.
I also tried Concat
UPDATE [yourtable] SET word =Concat(UPPER(LEFT(word,1)), LOWER(SUBSTRING(word,2)));
What it does is it only capitalizes the first word of the whole sentence , so now I am getting "My word"