robbid
asked on
How to recursively replace text within a column for a
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:
SELECT Customer_Name
FROM tbl_Customer WHERE (Customer_Name LIKE '% E %')
Returns:
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:
Jane Public
John Public
Thanks, in advance, for your help.
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:
SELECT Customer_Name
FROM tbl_Customer WHERE (Customer_Name LIKE '% E %')
Returns:
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:
Jane Public
John Public
Thanks, in advance, for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Open in new window