Reputation: 35607
We have the following:
create table #a_table
(names char(10))
insert into #a_table
values
('A;B;C;'),
('B;C;D;'),
('A;B;C;E;'),
('A;C;'),
('A;B;'),
('A;'),
('A;C;E;');
How do we update
the table and change every instance of C; with X;Y;
So
A;B;C; would become A;B;X;Y;
A;C;E; would become A;X;Y;E;
etc.
EDIT
A standard ANSI
approach that is compatible on SQL-server would be prefereable.
Upvotes: 1
Views: 84