Oracle® OLAP DML Reference 10g Release 1 (10.1) Part Number B10339-02 |
|
|
View PDF |
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])
Arguments
The expression in which bytes are to be changed. When text-expression is a multiline TEXT value, CHANGEBYTES preserves the line breaks in the returned value.
A text expression that contains one or more bytes that will be changed.
A text expression that contains one or more bytes that will replace oldtext.
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.
Notes
When you are using a single-byte character set, you can use CHANGECHARS instead of CHANGEBYTES.
This function does not accept NTEXT arguments, because it is oriented toward byte-manipulation instead of character manipulation. It always returns values of type TEXT. When you must use this function on NTEXT values, use the CONVERT or TO_CHAR function to convert the NTEXT value to TEXT.
You can use REPLBYTES to replace bytes in a text value beginning at a certain byte.
Examples