Capitalize the first letter of a sentence

  • Comments posted to this topic are about the item Capitalize the first letter of a sentence

  • 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

  • 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.

  • 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.

  • 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.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply