[vox-tech] mysql <--> oracle function question

David Hummel dhml at comcast.net
Thu Oct 14 21:59:59 PDT 2004


On Thu, Oct 14, 2004 at 09:54:19PM -0700, Dylan Beaudette wrote:
> 
> after searching about on google, and the MySQL manual ... i can't seem to find 
> an equivilent function in MySQL to Oracle's TRANSLATE() function...

You could use a nested REPLACE:

 Oracle: TRANSLATE('string','str','123') -> '123ing'

 MySQL:  REPLACE(REPLACE(REPLACE('string','s','1'),'t','2'),'r','3') -> '123ing'

-David


More information about the vox-tech mailing list