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 |
|
dim
Yak Posting Veteran
57 Posts |
Posted - 2011-01-28 : 00:40:00
|
| Hi,I have a address field in the database which I need to standardize. I need to have the starting letter of the string to be uppercase and rest all need to be lower case. At present the values are randomExample:470 DAISY DR,126 AERIAL DR,174 cranberry ridge drRequired:470 Daisy Dr,126 Aerial Dr,174 Cranberry Ridge DrI tried with couple options : UPPER(SUBSTRING(address,1,1))+ LOWER(SUBSTRING(address,2,LEN(address))) but this converts to all lower case. Please advice. Thank you,dimDp |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
dim
Yak Posting Veteran
57 Posts |
Posted - 2011-01-29 : 10:15:37
|
| Thanks for the help madhivanan....I was able to write a function and pass the string to get it in the proper case.In the requirementDp |
 |
|
|
dim
Yak Posting Veteran
57 Posts |
Posted - 2011-01-29 : 10:18:01
|
| In the requirement I also need to find a text in the string like lane --and convert it to Ln, Road to Rd, Street to st.....can you point me to where can I find such examples for regular expressions...thank you,Dp |
 |
|
|
|
|
|
|
|