0

Package mypackage.bdy owned by user mq has a public procedure CALCTAX. This procedure refers to a table TAXINFO owned by another mr.

code

 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

       ....

I get the error PL/SQL: SQL Statement ignored PL/SQL: ORA-00942: table or view does not exist while trying to compile the package.

Can anyone help me solve this issue?

Srini V
  • 11,045
  • 14
  • 66
  • 89
  • 1
    See [this](http://stackoverflow.com/questions/4399528/accessing-another-users-table-within-an-oracle-stored-procedure) – Iswanto San Oct 31 '13 at 11:12

1 Answers1

1

Try this DCL and then your procedure

GRANT SELECT ON MR.TAXINFO TO MQ;
Srini V
  • 11,045
  • 14
  • 66
  • 89