Skip Headers
Oracle® OLAP DML Reference
11g Release 2 (11.2)

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

CHANGEBYTES

The CHANGEBYTES function changes one or more occurrences of a specified string in a text expression to another string.

Return Value

TEXT

Syntax

CHANGEBYTES(text-expression oldtext newtext [number])

Parameters

text-expression

A TEXT expression in which bytes are to be changed. When text-expression is a multiline TEXT expression, CHANGEBYTES preserves the line breaks in the returned value.

oldtext

A TEXT expression that contains one or more bytes that to be changed.

newtext

A TEXT expression that contains one or more bytes that to replace oldtext.

number

An INTEGER that represents the number of times oldtext should be replaced with newtext when oldtext appears more than once in text-expression. The default is to change all occurrences of oldtext.

Examples

Example 7-39 Changing Text Values Using Bytes

This example shows how to change one instance of a portion of a text value.

The statement

SHOW CHANGEBYTES('Hello there, Joe\nHello there, Jane', 
   'there', - 'to you', 1)

produces the following output.

Hello to you, Joe
Hello there, Jane