MySQL Forums
Forum List  »  Optimizer & Parser

Re: Query optimization on INSERT ... SELECT ... SUBSTR
Posted by: Björn Steinbrink
Date: February 11, 2008 12:03AM

You can use SUBSTRING_INDEX() for that purpose, like:
mysql> SELECT SUBSTRING_INDEX('/var/www/images/bird09.jpg', '/', -1) filename\G
*************************** 1. row ***************************
filename: bird09.jpg


I'll leave the removal of the suffix as an exercise for you ;-)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Query optimization on INSERT ... SELECT ... SUBSTR
3251
February 11, 2008 12:03AM


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.