Oracle Error PLS-00323: subprogram or cursor is declared in a package specification and must be defined in the package body

本小妞迷上赌 提交于 2019-12-03 05:52:38

Your header and body procedure definitions don't match

In the header, you have:

PROCEDURE get_films(fname VARCHAR2);

Whereas in the body:

PROCEDURE get_films(fname IN film.title%type, 
   r_date OUT film.release_date%type, dur OUT film.duration%type)

You probably just need to update the header definition with the two additional OUT params?

To Summarize

  • Ensure the header definition matches all parameters of the body implementation (number of parameters, names of parameters, order of parameters, and the parameter types)
  • As per Alex's comment, do not mix and match the custom type (film.title%type) with the base type (VARCHAR2). Choose one or the other.

"subprogram or cursor 'M115_EDIT' is declared in a package specification and must be defined in the package body"

I got this error while i was working on my project.the reason for this was the a parameter name that was inside the procedure defined in the body did not match with the corresponding parameter name in the body.

my specification:

my body

my market_code parameter is different in the body when compared with the specification where it is defined as sub_market_code.error occurred due to this difference. i changed the sub_market_code parameter in the specification to market_code so that it matches with the body and this solved the problem mentioned above.

clearly 2 parameters that are mentioned in your body implementation of the procedure 'r_date' and 'dur' are not defined in the specification.error is due to this difference between the body and the specification.

"parameter name that was inside the procedure defined in the body did not match with the corresponding parameter name in the body."

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!