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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Query to get only First Letter in UPPER CASE
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vision.v1
Yak Posting Veteran

72 Posts

Posted - 09/27/2013 :  13:39:38  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 09/27/2013 :  15:13:50  Show Profile  Reply with Quote
STUFF(YourColumn,2,LEN(YourColumn),LOWER(SUBSTRING(YourColumn,2,LEN(YourColumn))))
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 09/28/2013 :  05:49:42  Show Profile  Reply with Quote
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

India
169 Posts

Posted - 09/29/2013 :  01:06:14  Show Profile  Reply with Quote

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

veeranjaneyulu
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000