Skip Headers
Oracle® OLAP Expression Syntax Reference
Release 11.2

Part Number 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

TRANSLATE

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.

Return Value

CHAR | NCHAR | VARCHAR2 | NVARCHAR2

Syntax

TRANSLATE(expr, from_string, to_string)

Arguments

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.

Example

TRANSLATE('disk', 'dk', 'Dc') returns the value Disc.