I have to migrate an Oracle stored procedure to DB2 LUW 10.5. It uses DBMS_LOB.SUBSTR()
function on a BLOB
parameter that receives an array of bytes from the client code.
What is its equivalent in DB2? SUBSTRB
seems fitting, but I am not sure.
db2db2-10.5db2-luw
I have to migrate an Oracle stored procedure to DB2 LUW 10.5. It uses DBMS_LOB.SUBSTR()
function on a BLOB
parameter that receives an array of bytes from the client code.
What is its equivalent in DB2? SUBSTRB
seems fitting, but I am not sure.
Best Answer
How about
DBMS_LOB.SUBSTR
, introduced in Db2 for LUW 9.7 as part of the Oracle compatibility feature?If you are migrating from Oracle consider reading about that feature and how to use it, it might save you some effort.
Plain old
SUBSTR
will work as well.