Skip Headers
Oracle® OLAP Expression Syntax Reference
Release 11.2

E23381-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

TRIM

TRIM removes leading or trailing characters (or both) from a character string.

Return Value

VARCHAR2

Syntax

TRIM([ { { LEADING | TRAILING | BOTH }[ trim_character ]  
       | trim_character
       }
       FROM 
     ]
     trim_source
    )

Arguments

LEADING removes matching characters from the beginning of the string.

TRAILING removes matching characters from the end of the string.

BOTH removes matching characters from both the beginning and the end of the string. (Default)

trim_character is a single character to be removed. By default, it is a space.

trim_source is the text expression to be trimmed.

Examples

TRIM('0' FROM '00026501.6703000') returns the value 26501.6703.

TRIM(LEADING '!' FROM '!!Help! Help!!') returns the value Help! Help!! .