MySQL Forums
Forum List  »  MySQL Query Browser

Re: Need to start a string in a particular place if a condition is met
Posted by: Scott Nemes
Date: July 26, 2012 12:50PM

Give the below a shot:

select `company`, `type`, `account id`,
IF (`type` like 'changed quantity%', mid(`information`,locate('changing',`information`),length(`information`)), `information`)
from `customers`;

--
Scott Nemes
MySQL DBA

http://www.linkedin.com/in/scottnemes
http://www.twitter.com/ScottNemes

Options: ReplyQuote


Subject
Written By
Posted
Re: Need to start a string in a particular place if a condition is met
July 26, 2012 12:50PM


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.