[linux] basename() function for Mysql

Reitsma, Rene - COB reitsmar at bus.oregonstate.edu
Fri Oct 2 17:57:38 PDT 2009


Dear All,

 

I need to extract the filename from a file path in MySQL.

 

On the linux command line I use 'basename'

 

>basename /foo/goo/zoo

zoo

 

In MySQL  I'd love to use something like: select basename(complete_path)
from ...

 

But unfortunately, I have not found anything like that yet.

 

Can you help?

 

RR

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oregonstate.edu/pipermail/linux/attachments/20091002/d3cd5663/attachment.htm 


More information about the linux mailing list