--Character function:
1, TRANSLATE (STRING,FROM_STR,TO_STR)
Returns a string that replaces each character in the FROM_STR (all occurrences) with the corresponding character in To_str. Translate is a superset of the functionality provided by replace. If the from_str is longer than TO_STR, the extra characters in from_str that are not in To_str are removed from string because they do not have corresponding substitution characters. The to_str cannot be empty. Oracle interprets an empty string as null, and if any argument in translate is null, the result is null.
Example:
Sql> Select Translate (' Kvenchou_zhou ', ' Kvenchou ', ' 12345678 ') from dual;
TRANSLATE (' KV
-------------
12345678_z678
Sql> Select Translate (' Uokvenchuuuuuooooou ', ' kvu ', ' en ') from dual;
TRANSLATE (' U
------------
Ozhenchooooo
Sql> Select Translate (' Uokvenchuuuuuooooou ', ' kvo ', ' Zhuo ') from dual;
TRANSLATE (' Uokvench
-------------------
Uuzhenchuuuuuuuuuuu
2, LTRIM (x,y)
The LTrim (x,y) function truncates the characters in X by one of the characters in Y, and is executed from the left, as long as the characters in Y are encountered, the characters in X are truncated until the function command ends when the character in X is encountered with no characters in Y.
Example:
Sql> Select LTrim (' 10900119224319 ', ' 109 ') from dual;
LTRIM (
------
224319
Sql> Select LTrim (' 109005119224319 ', ' 109 ') from dual;
LTRIM (' 109
----------
5119224319
3, RTRIM (x,y) relative to LTrim
Example:
Sql> Select RTrim (' Kvenchuuuuuooooou ', ' ou ') from dual;
RTRIM (
------
Kvench
Sql> Select RTrim (' Kvenchuuuuuoozooou ', ' ou ') from dual;
RTRIM (' Kvenchu
--------------
Kvenchuuuuuooz