Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Upper case to lower case

Author  Topic 

dz0001
Starting Member

35 Posts

Posted - 2015-05-04 : 10:49:44
Hi There,

I have column with value of all upper case, for example, FIELD SERVICE, is there anyway, I can convert into Field Service?




Thanks

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-05-04 : 11:06:51
Use this function: http://www.sql-server-helper.com/functions/initcap.aspx

in an UPDATE statement

Gerald Britton, MCSA
Toronto PASS Chapter
Go to Top of Page

dz0001
Starting Member

35 Posts

Posted - 2015-05-04 : 11:22:40
Gerald,

Thanks a lot for quick response. This works perfectly

Thanks again
Don
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2015-05-04 : 14:34:46
quote:
Originally posted by gbritton

Use this function: http://www.sql-server-helper.com/functions/initcap.aspx



Beware that @OutputString declared smaller than @InputString (and the RETURN declaration) so it will truncate input longer then 255 chars

Not sure of how to do it better, but it looks as though it may be slow / CPU intensive. Not sure if there are better methods out there though?
Go to Top of Page
   

- Advertisement -