Bug #107492 Support translate (Oracle DB's function) for handling strings operation.
Submitted: 6 Jun 2022 5:51 Modified: 6 Jun 2022 6:28
Reporter: Meiji Kimura Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S4 (Feature request)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[6 Jun 2022 5:51] Meiji Kimura
Description:
Oracle DB provide translate function for handling strings operation.

https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions196.htm

Almost of all RDBMS provide the same function based on Oracle DB's specification.

e.g.
Microsoft SQL Server
IBM Db2
PostgreSQL
Google Big Query
Snowflake

MySQL's REPLACE function can use for simple translation, 

https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_replace

but cannot use for complicated translation.

For example, this book explained in Chapter "6. Working with Strings"

https://www.oreilly.com/library/view/sql-cookbook-2nd/9781492077435/

Many recipe use TRANSLATE and REPLACE.
But MySQL support REPLACE only, so some recipe cannot apply MySQL only.

How to repeat:
See SQL Cookbook 2nd Edition.

Especially, 6.9. Ordering by a Number in a String.

Suggested fix:
Should support TRANSLATE function of Oracle DB.
[6 Jun 2022 6:28] MySQL Verification Team
Hello Meiji-San,

Thank you for the feature request!

regards,
Umesh