2012/03/08 16:11 -0500, Hank
I have a varchar field in the database, and I want to remove all text
between WordA and WordB, including WordA and WordB, leaving all text
before WordA and after WordB intact.
Possible with just SQL? I know I can write a PHP program to do it,
but it's not that
You may find this helpful: http://www.mysqludf.org/lib_mysqludf_preg/
On Thu, Mar 8, 2012 at 4:11 PM, Hank hes...@gmail.com wrote:
I have a simple problem:
I have a varchar field in the database, and I want to remove all text
between WordA and WordB, including WordA and WordB, leaving all
Try with a combination of functions LOCATE and SUBSTR.
Locate will return the positions for WordA and WordB within the original text,
and, SUBSTR will allow you to string what you you need all together.
David.
On Thu, Mar 8, 2012 at 4:11 PM, Hank hes...@gmail.com wrote:
I have a simple
They are regular words. I was hoping someone would already know how
to do it. I was trying to avoid rolling my own solution using the
string functions. It gets really messy, really quick.
-Hank
On Thu, Mar 8, 2012 at 8:18 PM, Michael Dykman mdyk...@gmail.com wrote:
If your words need to be