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

Part Number E17122-07
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
PDF · Mobi · ePub
OLADM493

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

OLADM1539Example 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 
Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF