Post by LeePost by LeeHi
There are lots of functions for title case, but they uppercase the
first letter of each word including conjunctions (with, it, and etc)
None of those examples are conjunctions (unless you intended "and" to be
part of that list) ... "with" is a preposition; "etc." is an abbreviation
of "et cetera"; "it" is a pronoun. ;-)
Post by LeePost by Leewhich should remain lowercase.
I think you meant that short words should remain lowercase. However, this is
not a universal rule, and there are exceptions to that rule. See:
http://www.suite101.com/content/how-to-write-in-title-case-a73866
Not even a word processor like Word gets this "right" (try it and see). And
you expect T-SQL to be able to?
Post by LeePost by LeeDoes anyone have a function which will do this?
Anyone?
T-SQL does not really lend itself to this type of task. If you can't do this
formatting in your client application, then you will probably have to resort
to a CLR procedure, which means you should be asking in .Net groups if
anyone has any functions that do this. I don't know of any, but this page,
http://www.llbest.com/?P=75, has a javascript function that does a version
of title-casing that you might find acceptable. View the source and search
it for "function TitleCase" to see how the author did it (he uses a list of
exception words combined with regular expressions).