MySQL Forums
Forum List  »  General

Re: Find specific word in string, return the previous 4 characters
Posted by: Peter Brawley
Date: January 29, 2019 11:16AM

Is this what you mean?

set @p = instr( field12, 'month' );
select substr( field12, @p-4, 4 );

Options: ReplyQuote


Subject
Written By
Posted
Re: Find specific word in string, return the previous 4 characters
January 29, 2019 11:16AM


Sorry, only registered users may post in this forum.

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.