Click here to Skip to main content
15,906,569 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have FirstName and LastName columns in sql..
I want to make First Name's first letter big and the rests low same LastName's first letter big and rests low.
For example : we have FisrtName and LastName is john sinatra name mine must be John Sinatra.
How T-SQL code should be ?
Posted
Updated 22-Jul-12 21:21pm
v3

 
Share this answer
 
Comments
y.baris 23-Jul-12 3:17am    
thanks for your link
SQL
SELECT
    UPPER(LEFT(FirstName, 1)) + LOWER(RIGHT(FirstName, LEN(FirstName) - 1)),
    UPPER(LEFT(LastName, 1)) + LOWER(RIGHT(LastName, LEN(LastName) - 1))
FROM Employees
 
Share this answer
 

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