I have a database column and its give a string like ,Recovery, Pump Exchange,.
,Recovery, Pump Exchange,
I want remove first and last comma from string.
Expected Result :
Use Substring():
Substring()
SET @String=SUBSTRING(@String ,2,Len(@String)-2)
SUBSTRING() returns part of an expression.
SUBSTRING()
Syntax:
SUBSTRING ( expression ,start , length )