暂无图片

ORA-32766:instr with negative offset

错误码

错误描述:instr with negative offset
错误原因:The current varchar behavior is different. e.g. instr('abcd', 'cd', -2, 1) returns 3, whereas instr(to_clob('abcd'), 'cd', -2, 1) returns 0, (i.e. no match), because the reverse search starts from offset -2, which points to 'c' and moving backward, i.e. 'd' is ignored. This is symmetric to instr('dcba','dc',2,1), which returns 0.
解决方法:ORACLE uses the same varchar semantics on LOBs (instr). Using the same example, instr(to_clob('abcd'), 'cd', -2, 1) will return 3 as in the varchar case.

向认证技术专家提问

向技术专家提问

相关搜索
查看更多》