Remove a single character from a varchar field SQL Server 2008

sql-server-2008, t-sql

Solution

You can update the table directly using `REPLACE` on the column values:

UPDATE myTable
SET myColumn = REPLACE(myColumn, '.', '')

Problem

I have a table with several `varchar` columns that are almost identical to primary keys I have in another table, with the exception of a period (`.`). I've looked at the `replace` function in T-SQL but the first argument isn't an expression. How can I remove all occurrences of a particular character with SQL? It seems like the correct answer might be to replace with a zero length string. Is that close? To whomever felt the question didn't exhibit research effort it was mainly due to a misunderstanding of the documentation itself.

Original source