ORA-29902: error in executing ODCIIndexStart() routine ORA-20000: Oracle Text error: DRG-50901: text query parser syntax error on line 1, column 19

前端 未结 3 1132
北荒
北荒 2021-01-28 16:33
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,         


        
相关标签:
3条回答
  • 2021-01-28 17:14

    The error is causing the BT, which is a reserved word. The solution is described in the Oracle Community forum.

    0 讨论(0)
  • 2021-01-28 17:18

    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.

    0 讨论(0)
  • 2021-01-28 17:24

    You must escape the BT special word (but you can just escape the entire string).

    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');
    
    0 讨论(0)
提交回复
热议问题