How to replace a comma with space in SQL
Background
I came across this issue when dumping the contents of a table into a CSV file from Enterprise Manager. Many people put comma’s into fields when typing their own address or something similar. This means when the CSV is opened many rows of data will be erroneous. So the solution is to replace any comma with a space so the contents of that field are still readable.
Solution
Replace(table.field, ‘,’, ‘ ‘)
*Replace the “table.field” with the applicable table name and field name
This simple bit of code fixes the comma issue and will allow the table to be dumped into a CSV for further manipulation.
So that’s how to replace a comma with a space in SQL
Add to Favourites