0

How do we convert Upper case text like this:

WITHIN THE FIELD OF LITERARY CRITICISM, "TEXT" ALSO REFERS TO THE ORIGINAL INFORMATION CONTENT OF A PARTICULAR PIECE OF WRITING; THAT IS, THE "TEXT" OF A WORK IS THAT PRIMAL SYMBOLIC ARRANGEMENT OF LETTERS AS ORIGINALLY COMPOSED, APART FROM LATER ALTERATIONS, DETERIORATION, COMMENTARY, TRANSLATIONS, PARATEXT, ETC. THEREFORE, WHEN LITERARY CRITICISM IS CONCERNED WITH THE DETERMINATION OF A "TEXT," IT IS CONCERNED WITH THE DISTINGUISHING OF THE ORIGINAL INFORMATION CONTENT FROM WHATEVER HAS BEEN ADDED TO OR SUBTRACTED FROM THAT CONTENT AS IT APPEARS IN A GIVEN TEXTUAL DOCUMENT (THAT IS, A PHYSICAL REPRESENTATION OF TEXT).

Into usual sentence case like this:

Within the field of literary criticism, "text" also refers to the original information content of a particular piece of writing; that is, the "text" of a work is that primal symbolic arrangement of letters as originally composed, apart from later alterations, deterioration, commentary, translations, paratext, etc. Therefore, when literary criticism is concerned with the determination of a "text," it is concerned with the distinguishing of the original information content from whatever has been added to or subtracted from that content as it appears in a given textual document (that is, a physical representation of text).

bluish
  • 26,356
  • 27
  • 122
  • 180
user194076
  • 8,787
  • 23
  • 94
  • 154
  • Do you really have to do this at the database level? – dee-see Aug 17 '11 at 22:37
  • I would like to, but, if not possible, c# will also work. – user194076 Aug 17 '11 at 22:38
  • For C# see http://stackoverflow.com/questions/3141426/net-method-to-convert-a-string-to-sentence-case – Martin Smith Aug 17 '11 at 22:40
  • 2
    If you use C#, can you attach it to a spell/grammer checker? Actual capitalization rules are somewhat complex, and you're probably going to want to have a human check the output, regardless. Probably, I'd start by _lowercasing_ everything in the DB, then using an external process/check to Selectively update it... – Clockwork-Muse Aug 17 '11 at 22:43
  • This thread might help you [UPPER Case to Proper Case](http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=47718) – Daryl Wenman-Bateson Aug 17 '11 at 23:55

2 Answers2

2

The base answer is just to use the LOWER() function.

It's easy enough to separate the sentences by CHARINDEX()ing for the period (and then using UPPER() on the first letter of each sentence...).

But even then, you'll end-up leaving proper names, acronyms, etc. in lower-case.

Distinguishing proper names, etc. from the rest is beyond anything that can be done in TSQL. I've seen people attempt it in code using the dictionary from MS Word, etc...but even then, Word doesn't always get it right either.

Chains
  • 12,541
  • 8
  • 45
  • 62
-1

I found a simple solution was to use INITCAP()

Greg
  • 1