Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Issue when using UTL_RAW.CAST_TO_BINARY_INTEGER for columns that have a large value

Gurgen NazaryanMay 16 2024 — edited May 18 2024

Hello,

I have a column with a BLOB type and am trying to get the BINARY INTEGER value from it with the following function.

SELECT UTL_RAW.CAST_TO_BINARY_INTEGER(DBMS_LOB.SUBSTR($MY_BLOB_COLUMN)) FROM $MY_TABLE;

For some records, the value is too large (UTL_RAW.SUBSTR function returns a string that is about 1800 chars in length) and because of that, I'm getting the following error.

ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.UTL_RAW", line 406
ORA-06512: at line 1

Please suggest how binary integers can be retrieved in such cases.

Thanks in advance.

This post has been answered by Paulzip on May 16 2024
Jump to Answer

Comments

Post Details

Added on May 16 2024
5 comments
323 views