oracle substr clob,ORA-64203 - doing a select substr(clob_col,1,4000)

Environment:

Oracle 12.1.0.2 on Exadata Linux

A database was converted from 11g single-byte character set to 12c multi-byte character set.

A table with a CLOB column is used to cut/paste various document types (Word, Excel, etc.) into that CLOB column.

As I understand it, in the single-byte character set (e.g. US7ASCII) a multi-byte character would be replaced with a blank in the CLOB.

Several documents have been added in the 12c multi-byte character set database.

The application code does a 'SELECT SUBSTR(,1,4000) STUFF'   and when it finds a multi-byte character in the first 4000 it returns more than 4000 bytes and raises the above ORA-64203 error.

I confirmed this by lowering the 4000 characters requested to 3990 and printing out both the LENGTH and the LENGTHB and showed where in several cases the LENGTH was say 3990 and the LENGTHB was 3998.

How should the application get around this error other than lowering the requested length below 4000?

Would DBMS_LOB.SUBSTR work?    For some reason I don't have access to the DBMS_LOB package yet or I would have tried it.

Thanks in advance for your comments!!

-gary

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值