Oracle为有效对象返回“表不存在”

时间:2013-10-31 11:08:20

标签: oracle stored-procedures

用户mypackage.bdy拥有的程序包mq具有公开程序CALCTAX。此过程引用另一个TAXINFO拥有的表mr

 PROCEDURE CALCTAX(P_TAX_END_DAT IN DATE,
                   P_CODE      IN VARCHAR2,
                   P_DEFER      OUT NUMBER) IS

  BEGIN
    IF (P_TAX_END_DAT <= V_FECHA_FIN_PERIODO) THEN
      P_DEFER := 15;
    ELSE
      BEGIN
          SELECT 15
          INTO P_DEFER
          FROM MR.taxinfo T
          WHERE SUBSTR(P_MINOR_CODE, 2, 5) IN T.TAX_CODE_NAME;

      EXCEPTION

      when not found

       ....

我在尝试编译包时遇到错误PL/SQL: SQL Statement ignored PL/SQL: ORA-00942: table or view does not exist

有人可以帮我解决这个问题吗?

1 个答案:

答案 0 :(得分:1)

尝试此DCL,然后尝试您的程序

GRANT SELECT ON MR.TAXINFO TO MQ;