Use TRANSLATE() to convert numbers : TRANSLATE « Conversion Functions « Oracle PL/SQL Tutorial






SQL>
SQL> SELECT TRANSLATE(12345,
  2                   54321,
  3                   67890) FROM dual;

TRANS
-----
09876

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