I have this query to select part of substring by >.
SELECT SUBSTRING_INDEX(translation, '>', 1) FROM categorias
What I want is update the substring to the upper case.
However this query has a sintax error
UPDATE A.translation
SET A.translation = UPPER(SELECT SUBSTRING_INDEX(A.translation, '>', 1))
FROM categorias as A
Any help?
data example:
Raw Materials & Chemicals > Rubber & Elastomers
that should be updated to
RAW MATERIALS & CHEMICALS > Rubber & Elastomers
I believe you can remove the inner
SELECTand you can alter yourUPDATEsyntax slightly to the following:Based on your comments I think you want the following:
See SQL Fiddle with Demo