当前位置: 代码迷 >> Oracle开发 >> SQLERROR: ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_Y'解决思路
  详细解决方案

SQLERROR: ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_Y'解决思路

热度:809   发布时间:2016-04-24 07:24:06.0
SQLERROR: ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_Y'
SQL code
PROCEDURE PROCESS_ITEM_EXP_STATUS_UPD(in_inquiry_id                IN inquire_all.inquiry_id%TYPE,                                      in_item_populate_status      IN inquire_all.item_populate_status%TYPE)ISv_CurMonth         number;v_PrevMonth        number;v_cursor           number;v_row              number;BEGINv_CurMonth := to_number(to_char(sysdate, 'MM'));IF (v_CurMonth=1)  THEN    v_PrevMonth := 12;  ELSE    v_PrevMonth := v_CurMonth -1;END IF;   BEGIN     v_cursor := dbms_sql.open_cursor;     /*dbms_sql.parse(v_cursor, 'UPDATE INQUIRE_' || v_PrevMonth  || v_sqlStr, dbms_sql.NATIVE);*/     /*dbms_sql.parse(v_cursor, 'UPDATE G3WEB.INQUIRE_ALL_2 SET ITEM_POPULATE_STATUS = '||[color=#FF0000]in_item_populate_status[/color] ||',ITEM_POPULATE_DATE = sysdate WHERE INQUIRY_ID = '||in_inquiry_id || ' AND FORM_COMPLETE_STATUS = ''Y''', dbms_sql.NATIVE);*/     dbms_sql.parse(v_cursor, 'UPDATE INQUIRE_' || v_PrevMonth  ||' SET ITEM_POPULATE_STATUS = ' || in_item_populate_status || ' , ITEM_POPULATE_DATE = sysdate WHERE INQUIRY_ID = '||in_inquiry_id || ' AND FORM_COMPLETE_STATUS = ''Y''', dbms_sql.NATIVE);     v_row := dbms_sql.execute(v_cursor);     dbms_sql.close_cursor(v_cursor);   EXCEPTION     WHEN others THEN        dbms_sql.close_cursor(v_cursor);        RAISE_APPLICATION_ERROR(-20200, '22Error in updating table [INQUIRE_'||v_PrevMonth ||'] SQLERROR: ' || SQLERRM(sqlcode));   END;COMMIT;END PROCESS_ITEM_EXP_STATUS_UPD;


问题:
如果把 in_item_populate_status hardcode 成'Y' ,没问题,
但是当传参数in_item_populate_status = 'Y'是不可以。 
出现的error 是:SQLERROR: ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_Y'

OGC_Y 是什么?




------解决方案--------------------
在调用OGC_Y 时数据类型或自定义类型出错了....
猜可能是个函数吧?
  相关解决方案