In the database, most of our cities are stored in all upper case. For reporting purposes, I need to have them returned as upper/lower. I used the below function, which works great for one word cities. However I cant figure out how to get it to capitalize the 1st letter of each word, for addresses containing multiple names such as Rancho Santa Margarita.
Upper(left(CR_MEMBER_ALLMEMBERDETAILS.ADDRESSCITY,1))+lower(substring(CR_MEMBER_ALLMEMBERDETAILS.ADDRESSCITY, 2, LEN(CR_MEMBER_ALLMEMBERDETAILS.ADDRESSCITY)))As ADDRESSCITY
This returns back: Rancho santa margarita; I need it to return Rancho Santa Margarita. Is this possible to do at the query level?
- Edited by Michelle949 Tuesday, July 07, 2015 10:56 PM
- Moved by Lydia ZhangMicrosoft contingent staff, Moderator 5 hours 29 minutes ago more appropriate