Oracle® OLAP Expression Syntax Reference Release 11.2 E23381-01 |
|
|
PDF · Mobi · ePub |
TRANSLATE
enables you to make several single-character, one-to-one substitutions in one operation. This expression returns an expression with all occurrences of each character in one string replaced by its corresponding character in a second string.
CHAR | NCHAR | VARCHAR2 | NVARCHAR2
TRANSLATE(expr, from_string, to_string)
expr
is a text expression to be modified.
from_string
consists of one or more characters to be replaced in expr
.
to_string
consists of one or more characters that replace the corresponding characters in from_string
. This string can be shorter than from_string
, so that a null replaces the extra characters. However, to_string
cannot be empty.
TRANSLATE('disk', 'dk', 'Dc')
returns the value Disc
.