SQL Capitalize First Letter - SQL Capitalize String
---All lower case
UPDATE stations SET stationname = LOWER(stationname)
---Capitalize
UPDATE stations SET stationname = STUFF(LOWER(stationname), 1, 1, UPPER(LEFT(stationname,1)) )
--Upper case two letter front
UPDATE stations SET stationname = STUFF(LOWER(stationname), 1, 2, UPPER(LEFT(stationname,2)) ) WHERE stationname like '__ %';
Ref : https://www.kodyaz.com/articles/sql-capitalize-first-letter-sql-capitalize-string.aspx
Ulasan