Capitalize the first letter of the second name in first names

From TNG_Wiki
Jump to navigation Jump to search

This sets the first letter in first names to a capital. Eg. John peter Peterson becomes John Peter Peterson

Copy and paste the text between the lines into the MySQL section of your MySQL admin, IMPORTANT: Make a backup before you try anything and use this at your own risk!


#Set the first letter of first names to capital 

UPDATE tng_people SET firstname = REPLACE(firstname,' a',' A');
UPDATE tng_people SET firstname = REPLACE(firstname,' b',' B');
UPDATE tng_people SET firstname = REPLACE(firstname,' c',' C');
UPDATE tng_people SET firstname = REPLACE(firstname,' d',' D');
UPDATE tng_people SET firstname = REPLACE(firstname,' e',' E');
UPDATE tng_people SET firstname = REPLACE(firstname,' f',' F');
UPDATE tng_people SET firstname = REPLACE(firstname,' g',' G');
UPDATE tng_people SET firstname = REPLACE(firstname,' h',' H');
UPDATE tng_people SET firstname = REPLACE(firstname,' i',' I');
UPDATE tng_people SET firstname = REPLACE(firstname,' j',' J');
UPDATE tng_people SET firstname = REPLACE(firstname,' k',' K');
UPDATE tng_people SET firstname = REPLACE(firstname,' l',' L');
UPDATE tng_people SET firstname = REPLACE(firstname,' m',' M');
UPDATE tng_people SET firstname = REPLACE(firstname,' n',' N');
UPDATE tng_people SET firstname = REPLACE(firstname,' o',' O');
UPDATE tng_people SET firstname = REPLACE(firstname,' p',' P');
UPDATE tng_people SET firstname = REPLACE(firstname,' q',' Q');
UPDATE tng_people SET firstname = REPLACE(firstname,' r',' R');
UPDATE tng_people SET firstname = REPLACE(firstname,' s',' S');
UPDATE tng_people SET firstname = REPLACE(firstname,' t',' T');
UPDATE tng_people SET firstname = REPLACE(firstname,' u',' U');
UPDATE tng_people SET firstname = REPLACE(firstname,' v',' V');
UPDATE tng_people SET firstname = REPLACE(firstname,' w',' W');
UPDATE tng_people SET firstname = REPLACE(firstname,' z',' Z');
UPDATE tng_people SET firstname = REPLACE(firstname,' x',' X');
UPDATE tng_people SET lastname = REPLACE(lastname,' a',' A');
UPDATE tng_people SET lastname = REPLACE(lastname,' b',' B');
UPDATE tng_people SET lastname = REPLACE(lastname,' c',' C');
UPDATE tng_people SET lastname = REPLACE(lastname,' d',' D');
UPDATE tng_people SET lastname = REPLACE(lastname,' e',' E');
UPDATE tng_people SET lastname = REPLACE(lastname,' f',' F');
UPDATE tng_people SET lastname = REPLACE(lastname,' g',' G');
UPDATE tng_people SET lastname = REPLACE(lastname,' h',' H');
UPDATE tng_people SET lastname = REPLACE(lastname,' i',' I');
UPDATE tng_people SET lastname = REPLACE(lastname,' j',' J');
UPDATE tng_people SET lastname = REPLACE(lastname,' k',' K');
UPDATE tng_people SET lastname = REPLACE(lastname,' l',' L');
UPDATE tng_people SET lastname = REPLACE(lastname,' m',' M');
UPDATE tng_people SET lastname = REPLACE(lastname,' n',' N');
UPDATE tng_people SET lastname = REPLACE(lastname,' o',' O');
UPDATE tng_people SET lastname = REPLACE(lastname,' p',' P');
UPDATE tng_people SET lastname = REPLACE(lastname,' q',' Q');
UPDATE tng_people SET lastname = REPLACE(lastname,' r',' R');
UPDATE tng_people SET lastname = REPLACE(lastname,' s',' S');
UPDATE tng_people SET lastname = REPLACE(lastname,' t',' T');
UPDATE tng_people SET lastname = REPLACE(lastname,' u',' U');
UPDATE tng_people SET lastname = REPLACE(lastname,' v',' V');
UPDATE tng_people SET lastname = REPLACE(lastname,' w',' W');
UPDATE tng_people SET lastname = REPLACE(lastname,' z',' Z');
UPDATE tng_people SET lastname = REPLACE(lastname,' x',' X');