﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Abdul Rahman  / Change String to Title Case(Initcap) / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 23 May 2013 06:10:29 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Change String to Title Case(Initcap)</title><link>http://www.sqlservercentral.com/Forums/Topic1010516-2821-1.aspx</link><description>Like any TSQL function that iterates through strings, this will run fine on small sets or a single field, but if you're going to use this in large set queries, you might want to consider writing it as a CLR assembly:  C# or VB.Net are faster at string parsing.</description><pubDate>Wed, 03 Nov 2010 08:41:04 GMT</pubDate><dc:creator>vgermscheid</dc:creator></item><item><title>RE: Change String to Title Case(Initcap)</title><link>http://www.sqlservercentral.com/Forums/Topic1010516-2821-1.aspx</link><description>Thanks for the useful script!However, I noticed that you used:[code="sql"]Select @vString = Replace(@vString, @vWord, '')[/code]This replaces _all_ occurrences of @vWord in @vString, eliminating repeated words in the title.I fixed this using:[code="sql"]Select @vString = RIGHT(@vString, LEN(@vString) - LEN(@vWord))[/code]This will just strip the first word from the string, which I believe was the intended behaviour.Cheers,David Scheppers.</description><pubDate>Thu, 28 Oct 2010 20:34:59 GMT</pubDate><dc:creator>dav0id</dc:creator></item><item><title>RE: Change String to Title Case(Initcap)</title><link>http://www.sqlservercentral.com/Forums/Topic1010516-2821-1.aspx</link><description>This is a very simplistic implementation of a function that would be very useful if fully implemented. Unfortunately it doesn't take into account the myriad of language-specific exceptions to title case. In English, typically you don't "upper case" the first letter of words like "of" and "and". You don't lower case the 2nd/3rd letters of some Celtic surnames (eg. McCall or O'Toole). Sometimes you don't lowercase the first letter after a hyphen (eg. Guinea-Bissau). I'm sure there's more, it's a bit mind-blowing when you get into it!James McCall</description><pubDate>Tue, 26 Oct 2010 13:13:59 GMT</pubDate><dc:creator>James McCall</dc:creator></item><item><title>Change String to Title Case(Initcap)</title><link>http://www.sqlservercentral.com/Forums/Topic1010516-2821-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/scripts/T-SQL/71448/"&gt;Change String to Title Case(Initcap)&lt;/A&gt;[/B]</description><pubDate>Mon, 25 Oct 2010 22:08:03 GMT</pubDate><dc:creator>rahman82pk</dc:creator></item></channel></rss>