sql - Remove white spaces from string and convert into title case -


Here's the example that I want in output ...

I have this Input = " Automated Email Sent "

But I need Output = " AutomaticEmailSent "

Thanks in advance!

is stealing a function from which one takes input text and makes it a suitable case (Otherwise known as title case):

  make the function proper (@ varchar (8000) as text) varchar (8000) starting @ resat bit; Announce @rate varchar (8000); Ii declared int; Declared @ c char (1); Select @Reset = 1, @I = 1, @reset = ''; Select (@i & lt; = len (@Text)) @ c = substring (@ text, @ i, 1), @rate = @reset + case when @reset = 1 then UPPER (@c) else LOWER (@ c) end, @reset = case when '[a-zA-Z]' like @c, then 0 and 1 end, @ i = @i +1 return @ rate end  

Then you can add this function to this task:

  choose REPLACE (dbo.ProperCase (column), '', '') from MyTable  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -