Capitalize only the first letter of each word of each sentence in SQL Server
declare @a varchar(30); 

set @a = 'qWeRtY kEyBoArD TEST&lt;&gt;&amp;''"X';

select stuff((
       select ' '+upper(left(T3.V, 1))+lower(stuff(T3.V, 1, 1, ''))
       from (select cast(replace((select @a as '*' for xml path('')), ' ', '&lt;X/&gt;') as xml).query('.')) as T1(X)
         cross apply T1.X.nodes('text()') as T2(X)
         cross apply (select T2.X.value('.', 'varchar(30)')) as T3(V)
       for xml path(''), type
       ).value('text()[1]', 'varchar(30)'), 1, 1, '') as [Capitalize first letter only];


This first converts the string to XML by replacing all spaces with the empty tag &lt;X/&gt;. Then it shreds the XML to get one word per row using nodes(). To get the rows back to one value it uses the for xml path trick.