given those strings in a mysql column...
All of the above (-2/2)
All of the above (0/3)
Once or twice (1/3)
is it possible to do a replace in order to delete the brackets and their content?
thanks
here you go:
create table rep(
sometext text
);
insert into rep(sometext) values('All of the above (-2/2)'),
('All of the above (0/3)'),
('Once or twice (1/3)');
update rep set sometext = replace(sometext,substring(sometext,locate('(',sometext)),'');
I used replace, then I found the substring of the text using locate, to send it as second arg to replace.
RTRIM() as well.
(n/n)variable?All of the aboveorOnce or twice? And you want the end result to strip off the(n/n)entirely, resulting inAll of the aboveorOnce or twice?