Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Capitalize the first letter of a sentence Expand / Collapse
Author
Message
Posted Wednesday, February 25, 2009 7:25 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, June 19, 2013 12:29 PM
Points: 11, Visits: 50
Comments posted to this topic are about the item Capitalize the first letter of a sentence
Post #664230
Posted Monday, April 06, 2009 4:24 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, August 06, 2013 5:28 AM
Points: 49, Visits: 260
I have been using a similar script on a website I manage, but it needs an overhaul, maybe this is something you could bare in my mind for your script.

The main issue are words that need to stay in upper case. For example 'SQL' would need to be left alone. To get around this I just added a clause to the script that would ignore these single words, but I also found that phrases with these words were problematic, so I also had to add a section that would fix a phrase that contained the word that needed to be kept in upper case.

The number of words keep on growing, and the function keeps growing in size.

The solution I am looking for would use a table as an exclude list. It needs to be able to identify the excluded word in a phrase, not just as a single variable.

Any ideas?

Steve
Post #690870
Posted Monday, April 06, 2009 6:39 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, June 18, 2009 3:02 AM
Points: 9, Visits: 8
williameduardo (2/25/2009)
Comments posted to this topic are about the item


Out of interest, why didn't you implement this in C#? The TSQL version will perform slowly in comparison.
Post #690949
Posted Tuesday, April 07, 2009 8:49 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, June 19, 2013 12:29 PM
Points: 11, Visits: 50
Well, this is a script I had used before and I wanted to share it. In my case this script was used with Crystal Reports.
Post #692106
Posted Tuesday, April 07, 2009 8:58 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, June 19, 2013 12:29 PM
Points: 11, Visits: 50
Steve: It seems that you may need your application to do the capitalzation for you instead of SQL by checking words in a table and leaving those words alone and capitalize the rest. If you want to do it all in SQL then a loop (cursor like) that checks all the words in a table and compares them may be your only solution but that will take more resources.
Post #692123
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse