sql server - cleaning CSV String/varchar in SQL -


i've got quirks in varchar field designated used csv (comma separated values) i'd clean up.

for example comma: val1, ,val2, val3 or trailing comma val1, val2,

how craft sql replaces , , , , removes last character if , ?

select replace(columnname, ', ,', ', ')   tablename 

this may not work when have multiple spaces between comma.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

ios - iPhone/iPad different view orientations in different views , and apple approval process -

Shrink a YouTube video to responsive width -