Oracle® OLAP DML Reference 10g Release 2 (10.2) Part Number B14346-03 |
|
|
PDF · Mobi · ePub |
The EXTBYTES function extracts a portion of a text expression.
TEXT
EXTBYTES(text-expression [start [length]])
A TEXT
expression from which a portion is to be extracted. When text-expression is a multiline TEXT
value, EXTBYTES preserves the line breaks in the returned value.
An INTEGER
that represents the byte position at which to begin extracting. The position of the first byte in text-expression is 1. When you omit this argument, EXTBYTES starts with the first byte.
An INTEGER
that represents the number of bytes to be extracted. When length is not specified, or exceeds the number of bytes from start to the end of text-expression, the part from start to the end of text-expression is extracted.
Example 14-5 Extracting Text Characters Using Bytes
This example shows how to extract portions of text from the TEXT value 'hellotherejoe'
.
The statement
SHOW EXTBYTES('hellotherejoe', 6, 5)
produces the following output.
there
The statement
SHOW EXTBYTES('hellotherejoe', 11)
produces the following output.
joe