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.
Example:
,the,their,then
to the,their,then
or
the,their,then,
to the,their,then
EDIT: I am looking for an UPDATE statement. I need to change the records.
@codingbiz, Thank you for the website link:
Quick examples:
Thanks!
You are looking for the
TRIM
function.Check this website
which in your case would be ',' instead of 'xyz'
The question was how to remove the leading and trailing characters I will show you an example with an update query.