Spencer Koss1,404 Points
Capitalizing One Character in a variable from a Database
So lets say we are using this addresses table as an example with the following variables: Street, City, Zip, State, Country
And we wanted to format this exactly the same way our challenge questions asks however with one added caveat.
We want to assume our Database doesn't already have capital letters in the beginning of Street, City, and State.
Question: How would we manipulate those three variables into capitalizing ONLY the first letter in the variable?
KRIS NIKOLAISEN54,340 Points
You could use substr() and upper() functions to capitalize the first letter. For example with city:
SELECT UPPER(SUBSTR(City,1,1)) || SUBSTR(City,2) AS NewCity FROM addresses;