SQL Server query to print first letter of a Name in Upper Case and all other letter in Lower Case.

Amatya
Posted by Amatya under Sql Server category on | Points: 40 | Views : 288
SQL Server query to print first letter of a Name in Upper Case and all other letter in Lower Case.

Select UPPER(SUBSTRING(Firstname, 1,1))+ 
LOWER(SUBSTRING(Firstname, 2, Len(FirstName)-1))As Firstname from tblDNFRec


Output:
Amatya
Anamika
Aditya
Amar
Bhushan
Bindu
Chahal
Diya
Girish
Hari
Irfan
Mayank
Ram
Rachna
Sachin
Shryansh
Swati
Talat
Urvi

Thanks
Amatya

Comments or Responses

Login to post response