I have field that contains a comma-separated list. Some old records have a comma at the beginning or end of the field. I need to remove these extra commas.
SELECT TRIM(BOTH ',' FROM fieldname) from tablename
SELECT TRIM(LEADING ',' FROM fieldname) from tablename
SELECT TRIM(TRAILING ',' FROM fieldname) from tablename