Capitalize every word of a sentence? SQL Server 2008

0

Dear, I require the help of your wise minds.

From a table name "Details" contains the column "Descripted", which may contain alphanumeric data and may have X number of words, example.

[Descrip]
01. reMunerAcion feBrero 2017
02. enERO eMP 141414
03. 20178233 NOVIEMBRE

The expected result:

[Descrip]
01. Remuneracion Febrero 2017
02. Enero Emp 141414
03. 20178233 Noviembre

I tried to do it in the following way but I only managed to capitalize the first word of the sentence with the following sentence:

UPDATE DETALLES
SET 
Descrip=UPPER(LEFT(Descrip,1))
+LOWER(SUBSTRING(Descrip,2,LEN(Descrip)))

Any ideas on how to achieve it? I have searched for it but I can not find it for each sentence. SQL Server 2008 R2

    
asked by Esteban Jaramillo 09.06.2017 в 20:22
source

1 answer

1

What you should do is a function that helps you to go through each word in each record of the "Descripted" column. In this section of StackOverflow (English) you can find it:

SQL: capitalize first letter only

I hope you serve, greetings.

    
answered by 09.06.2017 / 20:37
source