SUBSTR function - Returns part of a VARBINARY value
The SUBSTR function returns a specified portion of VARBINARY value.
Syntax
Parameters
- input
- An input argument of type VARBINARY(32672) that specifies the value to be searched.
- pos
- An input argument of type INTEGER that specifies the value of starting position for the substring extraction.
- len
- An input argument of type INTEGER that specifies the value of length of the substring to be extracted.
Authorization
EXECUTE privilege on the UTL_RAW module.
Example
Example 1: The following example returns a portion of a VARBINARY
value:
db2 "select sysibmadm.utl_raw.substr(bx’01020304’, 1, 2) from sample "
1
-----------
X’0102’
1 record(s) selected.