Oracle® OLAP DML Reference 11g Release 2 (11.2) Part Number E17122-07 |
|
|
PDF · Mobi · ePub |
The TRIM function enables you to trim leading or trailing characters (or both) from a character string.
You can also trim leading characters using LTRIM and trailing characters using RTRIM.
The data type of the string you are trimming (that is, trim-source).
TRIM ([{{LEADING|TRAILING|BOTH} [trim_characters])|trim_character} FROM] trim_source)
An expression that specifies the character values to be trimmed. This text expression can be any of the text data types.
When you specify multiple characters in trim-characters, the function searches for each character in trim_source, in turn, removing characters from trim_source until it encounters a character in trim_source that is not in trim-characters.
When you do not specify a value, then the default value is a blank space and the function removes leading and trailing blank spaces.
Specifies that the function removes any leading characters from trim_source that are equal to trim_characters.
Specifies that the function removes any trailing characters from trim_source that are equal to trim_characters.
Specifies that the function removes leading and trailing characters from trim_source that are equal to trim_characters.
An expression that is the string value to be trimmed. This text expression can be any of the text data types.