本文介绍了ORA-29902:执行ODCIIndexStart()例程时出错ORA-20000:Oracle文本错误:DRG-50901:第1行第19列的文本查询解析器语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SELECT person_no sub_sys_individual_id,
 nm_e,
 nm_a,
 nvl(sex, -1) sex,
nvl(prs_nat, -999) prs_nat,
person_no,
'NA' prog_where_not_allowed,
'NA' udb_no,
 person_tp,
 pass_no
FROM ban_inq_tab
WHERE contains (nm_e ,'xxstart JUHETI BT MEMED ASMANI%') >0
AND (trans_flag IS NULL OR trans_flag = 'C');

请帮助我解决此问题,并获取解析器语法错误

please help me in this issue and getting parser syntax error

推荐答案

仅供参考,如果您在存储过程中有输入参数(将在其中查询),也会收到此错误(我在Oracle 12.2上)一个包含谓词的NVARCHAR2.因此,如果您以NVARCHAR2的形式向存储的proc输入参数,并且该参数指定给包含谓词中的查询,则将其更改为VARCHAR(或者也许是CLOB),它将不再抛出此错误.

FYI, you'll also get this error (i'm on Oracle 12.2) if you have the input parameter to a stored proc that will be the query in a contains predicate as an NVARCHAR2.So if you have input params to a stored proc as NVARCHAR2 and that parameter is destined for the query in the contains predicate, then change it to VARCHAR (or maybe CLOB) and it will no longer throw this error.

这篇关于ORA-29902:执行ODCIIndexStart()例程时出错ORA-20000:Oracle文本错误:DRG-50901:第1行第19列的文本查询解析器语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 12:47