travisbrown
Technical User
- Dec 31, 2001
- 1,016
I quickly needed to clean up some data before reporting - making city names proper case, etc.
This is how I did it, but is there a better way just for future reference? I guess with 2005 and greater you could use REGEX.
REPLACE(LEFT(city,1),LEFT(city,1),UPPER(LEFT(city,1))) + RIGHT(city,LEN(city)-1)
I know it's not truly proper case, rather, initial caps, but it was all I needed for the moment.
This is how I did it, but is there a better way just for future reference? I guess with 2005 and greater you could use REGEX.
REPLACE(LEFT(city,1),LEFT(city,1),UPPER(LEFT(city,1))) + RIGHT(city,LEN(city)-1)
I know it's not truly proper case, rather, initial caps, but it was all I needed for the moment.