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!

Oracle : How to truncate a section of the text(more than 4000 character) in BLOB by searching start

User_QH2BLOct 15 2020

I have start and end string , i want to first truncate the paragraph from start to end string (which is greater than 4000 cHARACTER). I used below but that works only with the number position but does not work with the string search. I know the error is because the string coming out is greater than 2000. If i restrict to 2000 then it works but my truncated string is around 19000 character length.

utl_raw.cast_to_varchar2(dbms_lob.substr(raw_data, 4005, 1))

ORA-06502: PL/SQL: numeric or value error: raw variable length too long

Comments
Post Details
Added on Oct 15 2020
2 comments
7,924 views