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 :
Alternatively to dasblinkenlight's method you could use replace:
DECLARE @words VARCHAR(50) = ',Recovery, Pump Exchange,' SELECT REPLACE(','+ @words + ',',',,','')