MySQL Forums
Forum List  »  Newbie

Re: How to do this insert query
Posted by: Peter Brawley
Date: April 03, 2015 10:48AM

It's usually a mistake to store markup language with text--display logic belongs in the display layer, not in the data.

Nevertheless, if you have a compelling reason to do this, if there's a single space after each word, then the text up to and including the 300th word is ...

substring_index( text, ' ', 300 )

and you should be able to work it out from there.

Options: ReplyQuote


Subject
Written By
Posted
April 03, 2015 10:00AM
Re: How to do this insert query
April 03, 2015 10:48AM


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.