缺少括号错误oracle ORA-00907

时间:2013-07-19 06:39:51

标签: compiler-errors oracle10g ora-00907

我想使用以下输入参数执行此过程。

DECLARE 
    in_fieldname_list VARCHAR2(4000); 
    L_FILE_NAME VARCHAR(200); 


    BEGIN 

    in_fieldname_list := 'PROPTYPE'', ''ADDR1'', ''CITY'', ''STATE'', ''ZIP'', ''OAPPRAISAL'; 

    pack_audit_trail_report.SP_AUDIT_TRAIL ( 
        'B', 
        'LEH005', 
        NULL, 
        NULL, 
       in_fieldname_list, 
        '12/10/2012', 
        '01/15/2013', 
        L_FILE_NAME); 
    END;

我收到以下错误:

Error report:
: missing right parenthesis
ORA-06512: at "SYS.DBMS_SYS_SQL", line 909
ORA-06512: at "SYS.DBMS_SQL", line 39
ORA-06512: at "CDM.PACK_AUDIT_TRAIL_REPORT", line 166
ORA-06512: at line 10
00907. 00000 -  "missing right parenthesis"
*Cause:    
*Action:

请告诉我在哪里错过了括号。

1 个答案:

答案 0 :(得分:3)

我不知道,您的SP_AUDIT_TRAIL程序需要什么,但我觉得您应该使用正确的引号来填充字段列表:

in_fieldname_list := '''PROPTYPE'', ''ADDR1'', ''CITY'', ''STATE'', ''ZIP'', ''OAPPRAISAL''';