I have tried various Title Case solutions from here and they give me an 0
in the column. I have to change the LEN
to LENGTH
to get it to run. If I strip the statement down to its 2 parts it works.
UPDATE names
SET
surname = UPPER(LEFT(surname, 1)) +
LOWER(RIGHT(surname, LENGTH(surname) - 1));
Or
update names
set surname = upper(substring(surname,1,1)) +
lower(substring(surname, 2, length(surname)-1))
where length(surname) > 0 ;