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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Query to get only First Letter in UPPER CASE

Author  Topic 

vision.v1
Yak Posting Veteran

72 Posts

Posted - 2013-09-27 : 13:39:38
Hi,

In my database all names are stored in Upper Case like below:

SMITH,
JHON,
STEVEN

but i need to get the result like below, if all ther letter are in UPPERCASE when we are importing data to a third party tool getting error, so i need the result like below:

Smith
Jhon
Steven

Please advise..

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-09-27 : 15:13:50
[code]STUFF(YourColumn,2,LEN(YourColumn),LOWER(SUBSTRING(YourColumn,2,LEN(YourColumn))))[/code]
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-09-28 : 05:49:42
STUFF(LOWER(Field),1,1,LEFT(Field,1))

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

VeeranjaneyuluAnnapureddy
Posting Yak Master

169 Posts

Posted - 2013-09-29 : 01:06:14

Select Stuff(Lower(UPPER(YourColumn)),1,1,Left(UPPER(YourColumn),1))From TableName

veeranjaneyulu
Go to Top of Page
   

- Advertisement -