Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kking
Starting Member
3 Posts |
Posted - 2007-07-12 : 15:57:09
|
| I am trying to create a mail merge list from a database. The database has everything in upper case. I want just the first letter of each word in a column to be upper. My script below works for a single word in a column but there must be a better method and a way to convert multiple words in one column to only first letter of each word upper case.upper(left(OCCPNAME,1))+lower(substring(OCCPNAME,2,30)) as 'OCCPNAME'Ken |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-07-12 : 15:58:08
|
Search for a function name "Proper Case" here at SQLTeam Peter LarssonHelsingborg, Sweden |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-07-12 : 15:58:59
|
| http://www.google.com/search?q=proper+case+site%3Asqlteam.com&rls=com.microsoft:en-US&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1Peter LarssonHelsingborg, Sweden |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2007-07-12 : 17:20:40
|
| http://weblogs.sqlteam.com/jeffs/archive/2007/03/09/60131.aspxCODO ERGO SUM |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-07-13 : 03:31:04
|
That is actually the first link provided from Google Peter LarssonHelsingborg, Sweden |
 |
|
|
kking
Starting Member
3 Posts |
Posted - 2007-07-17 : 11:01:54
|
| My issue is that I am pulling data out of the database with a select statement to create a mail merge list. The database owner wants to keep the database all upper case. So I want to use the select statement to convert multi-word columns i.e. company name or city to first letter in each word upper case. Can this be done with a select statement.Ken |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2007-07-17 : 12:05:43
|
| What did you find when you tested your query with the function on the link I provided?CODO ERGO SUM |
 |
|
|
|
|
|