How do I remove a trailing comma in SQL Server?

First, you want to TRIM your data to get rid of leading and trailing spaces. Then REVERSE it and check if the first character is , . If it is, remove it, otherwise do nothing. Then REVERSE it back again. How do you remove trailing commas in SQL? Trim(“,”c) removes leading and trailing commas. Another …

Read more