How to recursively replace text within a column for a
Posted on 2013-02-07
I have a table [tbl_Customer] where I have a column that contains a customer's name [Customer_Name]. It contains first and last names together with some middle initials.
I'd like to be able to run an update where I can remove the middle initial of certain letters.
The select statement below, for example, returns a list of customers where I want to remove the middle initial E:
FROM tbl_Customer WHERE (Customer_Name LIKE '% E %')
Jane E Public
John E Public
When the replace is complete, I would like the name to remove the selected initial and the table would contain the following for the two entries shown above:
Thanks, in advance, for your help.