Dit is een zoekopdracht die werkt:
SELECT
CONCAT(
UPPER(SUBSTRING(Name,1,1)),
LOWER(SUBSTRING(Name,2,Locate(' ', Name)-1)),
UPPER(SUBSTRING(Name,Locate(' ', Name)+1,1)),
LOWER(SUBSTRING(Name,Locate(' ', Name)+2)))
FROM NameTable;
Dit is het resultaat:
Name
Firstname Lastname
Firstname Lastname
Firstname Lastname
Firstname Lastname
Om kolom te UPDATE gebruik,
UPDATE NameTable
SET NameTable.Name = CONCAT(
UPPER(SUBSTRING(Name,1,1)),
LOWER(SUBSTRING(Name,2,Locate(' ', Name)-1)),
UPPER(SUBSTRING(Name,Locate(' ', Name)+1,1)),
LOWER(SUBSTRING(Name,Locate(' ', Name)+2)));
Groeten