I'm trying to remove part of a string, after a string is found, from a text field. What I want to remove will always be at the end of the string, will not be identical, but will always start with the same string, < iframe (no space between < and i, I just put it there because it won't print if I don't).
With the help of my brother-in-law, I was able to determine how to code it to run for one row, specified. But we now can't figure out how to run it for all rows. The code we have so far, for one row, is below:
update products_description
set products_description
= (select test
from
(
select substr(PD.products_description,1,instr(PD.products_description, '<iframe') -1) as test
from products_description PD
where products_id=36
) as x)
where products_id=36
This is actually a followup to this thread, where I was unable to determine a solution.
Thanks to anyone that can shed some light on this.
EDIT: just thought to point out, the table and column I am dealing with are both named products_description.