Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Capitalize the first letter of a sentence


Capitalize the first letter of a sentence

Author
Message
williameduardo
williameduardo
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 Visits: 50
Comments posted to this topic are about the item Capitalize the first letter of a sentence
Dooza-770962
Dooza-770962
Valued Member
Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)

Group: General Forum Members
Points: 63 Visits: 274
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
oliver.wilkinson-932468
oliver.wilkinson-932468
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
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.
williameduardo
williameduardo
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 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.
williameduardo
williameduardo
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search