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 |
galbrecht
Starting Member
17 Posts |
Posted - 2008-02-18 : 14:50:41
|
HiI need to extract data from tables in sentence case. I sthere a way to do this. I would like to have the names of people and the start of a new sentence to Have capitals. The table has "text notes - free text" entered against a dog owner but in alot of cases there is no sentence case.Is there away to do thisThanksGreg |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2008-02-18 : 18:47:09
|
sentence case? dog owner?Can you post an example of the way the text is stored and the way you want it displayed?Be One with the OptimizerTG |
 |
|
galbrecht
Starting Member
17 Posts |
Posted - 2008-02-19 : 14:47:48
|
Hey TGthis is the origional format2542|29 Mar 2004 - waiuku - tyson died 260304 refunded $13.802552|05 Dec 2002 - noemaxw - CHEVY DIED ON 04.11.2002. WAS CREATED This is what I want2542|29 Mar 2004 - waiuku - Tyson died 260304 refunded $13.802552|05 Dec 2002 - noemaxw - Chevey died on 04.11.2002. Was CreatedThanksGreg |
 |
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2008-02-19 : 15:16:44
|
String functions are pretty clearly laid out in Books Online (have a look at upper, lower, charindex).The bigger problem that you have is defining your translation rules. How do you know that CHEVY not only should be converted to Upper-C-lower-everything-else, but also should be spelled differently? How do you know what the end of a sentence is (is the 8 in $13.80 a new sentence?)? How do you know when to capitalize words that are not at the start of a sentence (like Created)?If I were you, I'd simply either leave it the way it is or upper() everything.Jayto here knows when |
 |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
|
|
|
|