MySQL Forums
Forum List  »  Newbie

Query to find a substring in another field?
Posted by: Dwight Schrute
Date: August 29, 2014 02:14AM

I have a text field Field1 in a table Table1 that has a lot of text in it. How do I update Table1 to set the value of another field Field2 to all substrings in Field1 that start with "ip"?

So, for example if Field1's values look like this:

"Lorem ipsum dolor sit"
"The IP address of the user"
"Half a bee, philosophically, must ipso facto half not be"

...the corresponding Field2 values would be:

ipsum
IP
ipso

How do I do this?

Options: ReplyQuote


Subject
Written By
Posted
Query to find a substring in another field?
August 29, 2014 02:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.