Skip Headers
Oracle® OLAP DML Reference
11g Release 1 (11.1)

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

Go to previous page
Previous
Go to next page
Next
View PDF

REMCHARS

The REMCHARS function removes one or more characters from a text expression and returns the value that remains.

Tip:

When you are using a multibyte character set, you can use the REMBYTES function instead of the REMCHARS function.

Return Value

TEXT or NTEXT

Syntax

REMCHARS(text-expression start [length])

Arguments

text-expression

The expression from which REMCHARS removes characters. When the characters to remove from text-expression contain embedded line breaks, these breaks are also removed. Other line breaks are preserved. Removed line breaks are not counted toward the total number of characters removed.

When you specify a TEXT expression, the return value is TEXT. When you specify an NTEXT expression, the return value is NTEXT.

start

An INTEGER that represents the character position at which to begin removing characters. The position of the first character in text-expression is 1. When the value of start is greater than the length of text-expression, REMCHARS simply returns text-expression.

length

An INTEGER that represents the number of characters to be removed. When length is not specified, only the character at start is removed.

Examples

Example 8-72 Using REMCHARS to Remove a Substring

This example shows how to remove the substring there from the text value hellotherejoe.

SHOW REMCHARS('hellotherejoe', 6, 5)

hellojoe

Example 8-73 Removing a Single Character

This example shows how to remove the character t from the text value hellotherejoe.

SHOW REMCHARS('hellotherejoe', 6)

helloherejoe