Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

String manipulation : Need to change the first and last letters to upper case

$
0
0
I need to change the first and last letter to upper case . The below piece of the code works , just wanted to know if there is a better way of doing it . declare @name varchar(100) Select @name = 'test'print Upper(substring(@name,1,1))+Substring(@name,2,Len(@name)-2) + Upper(substring(@name,(len(@name)-0),Len(@name)))

Viewing all articles
Browse latest Browse all 3145

Trending Articles