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 :
For removing same character you can use below system function TRIM
Only from 2017
2017
DECLARE @str VARCHAR(MAX) = '[REMOVE THIS CLOSE BRACKET]' SELECT TRIM('[]' FROM @str)
But for different character removing you need to use SUBSTRING
SELECT SUBSTRING(@str,2,LEN(@str)-2)