Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to display YOU ARE GOOD IN SQL text as You Are Good In Sql

What I have tried:

select lower('YOU ARE GOOD IN SQL')

but output am not getting as expected.

It displays like this

all in lower case letter but i want first letter in word with capital
Posted
Updated 18-Apr-16 19:20pm

 
Share this answer
 
Comments
Animesh Datta 19-Apr-16 1:21am    
Gr8 answer . My 5!
Peter Leow 19-Apr-16 1:32am    
Thank you, Animesh Datta.
SQL
SELECT UPPER(LEFT(YourColumnName,1))+LOWER(SUBSTRING(YourColumnName,2,LEN(YourColumnName))) AS YourColumnName FROM [YourTableName]
:)
 
Share this answer
 
v2
Hello ,
If you want to get each word with capital number then go for Sir Peter Leow's answer
or else
If you want to make only first letter to be capital and others remaining same then try
SELECT UPPER(LEFT(YourColumnName,1))+SUBSTRING(YourColumnName,2,LEN(YourColumnName)))FROM [YourTableName]

Thanks
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900