Using the TRANSLATE() Function : TRANSLATE « Conversion Functions « Oracle PL/SQL Tutorial






TRANSLATE(x, from_string, to_string) convert the occurrences of characters in from_string found in x to corresponding characters in to_string.

SQL> SELECT TRANSLATE('THIS IS A DEMO',
  2                   'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
  3                   'EFGHIJKLMNOPQRSTUVWXYZABCD') FROM dual;

TRANSLATE('THI
--------------
XLMW MW E HIQS

SQL>








15.9.TRANSLATE
15.9.1.Translate replaces a string character by character
15.9.2.Using the TRANSLATE() Function
15.9.3.Pass column values to TRANSLATE()
15.9.4.Use TRANSLATE() to convert numbers
15.9.5.Use TRANSLATE() with column
15.9.6.select translate('beer bucket','beer','milk') as translate