Package中私有的Procedure/Function(没在Package Specification声明)需要注意放置的位置
比如下面的Package,Procedure A 想要调用 Procedure B,
CREATE OR REPLACE PACKAGE AAAAA AUTHID CURRENT_USER AS PROCEDURE A; END AAAAA;
CREATE OR REPLACE PACKAGE BODY AAAAA AS PROCEDURE A IS BEGIN B; END; PROCEDURE B IS BEGIN dbms_output.put_line(\'In PROCEDURE B\'); END ; END AAAAA;
会报错:PLS-00313: \'B\' not declared in this scope
原因: B不是Public的Procedure,如果A想调用B,那么B的定义必须放在A的前边。
PLS-00313: "string" not declared in this scope
Cause: There is no declaration for the given identifier within the scope of reference. The identifier might be misspelled, its declaration might be faulty, or the declaration might be placed incorrectly in the block structure.
Action: Check the spelling and declaration of the identifier. Also confirm that the declaration is placed correctly in the block structure.
所以正确的写法是:
CREATE OR REPLACE PACKAGE BODY AAAAA AS PROCEDURE B IS BEGIN dbms_output.put_line(\'In PROCEDURE B\'); END ; PROCEDURE A IS BEGIN B; END; END AAAAA;
或者,如果确实想把B放到后边,那么可以在前面声明下,这样后边不过谁调用,也不会报错,这也是一个很好的习惯。
CREATE OR REPLACE PACKAGE BODY AAAAA AS PROCEDURE B; PROCEDURE A IS BEGIN B; END; PROCEDURE B IS BEGIN dbms_output.put_line(\'In PROCEDURE B\'); END ; END AAAAA;
Reference:http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:11471812249709
相关推荐
codeblocks中报错:'to_string' was not declared in this scope解决方案
keil常见错误 main.c(35): warning: #128-D: ...initSpi.c(6): error: #268: declaration may not appear after executable statement in block main.c(31): warning: #223-D: function "initNvic" declared implicitly
faac报错mpeg4ip_win32.h:70:36: error:'_TRUNCATE' was not declared in this scope ret = vsnprintf_s(buffer, count, _TRUNCATE, format, ap); mpeg4ip_win32.h:70:57: error:'vsnprintf_s' was not declared ...
--------bignum.h:34:25: error: ‘make_unique’ was not declared in this scope inline ulong() : buf_(make_unique[]>(dim)) {} --------------这个问题 以及一个是是关于 /* libc already has support */ ...
学习QT时做的QT实现的简单任务管理器,框架做的还可以,主要给新手借鉴应该比较有用。里面包含大量WINDOWS API的使用
/src/lidar_lite.cpp:36:64: error: 'i2c_smbus_write_byte_data' was not declared in this scope 使用此命令安装i2c-dev : apt-get install libi2c-dev 我在此网站上找到了一个很棒的教程(使用我的图书馆!...
vue-eslint-parser:”.vue“文件的ESLint自定义解析器
I have fixed this bug below: ------------------------------------------ # In file included from ../include/tclap/...# ../include/tclap/MultiArg.h:103: error: ‘EOF’ was not declared in this scope
项目布局|- CMakeLists.txt // projects CMakeLists.txt|- src/| || |- controller/ // Folder containing Controller where all endpoints are declared| |- client/ // HTTP client is here. Used in "proxy" ...
DBMS STATS Package Fails with Error 'ORA-04063: package body "SYS.DBMS_REGISTRY_SYS" has errors'
For undergraduate students in Computer Science and Computer Programming courses or beginning programmers A solid foundation in the basics of C++ programming will allow readers to create efficient, ...
Assigns a value to a user-defined workflow variable Note: The variable must have been declared in the workflow Variables tab
/bin/sh -e# -e stops at first failing command# Install all the needed 32bit packages for the StarBoard software to run# libjpeg62 is declared as dependency by the package but not the rest...sudo apt-...
Maven3实战笔记04——Maven的生命周期和插件。
SyntaxError: Non-UTF-8 code starting with '\xd6' in file Z:/Python/xxx/first.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details 原因:Python中默认的编码...
Linux下替换memset为自己写的函数,但是用jmp绝对跳转时会遇到段错误的问题
An input variable with the name "name" has not been declared. This variable can be declared with a variable "name" {} block. var-file = config1.tfvarsすると,以下警告が出る $ tf plan -var-file=config1...
stm32f407 平台上的USART程序,官方例程
确定根据版本号快速检查顶级NPM和Bower依赖关系。 有关将此任务集成到grunt管道中的信息,请参阅 。... // from the package's root folder executedeps-okdeps-ok --verbose// prints declared and installed ver
基于stm32的emwin图形界面开发,可作为移植模板,实测可用