PLS-00565的错误解决
来源:互联网 发布:阿里云上海代理商 编辑:程序博客网 时间:2024/05/21 03:24
今天被个小问题折腾了10分钟,哎
sys@MYORACLE> CREATE OR REPLACE TYPE NUMTABLETYPE is table of number
2 /
CREATE OR REPLACE TYPE NUMTABLETYPE is table of number
*
ERROR at line 1:
ORA-06545: PL/SQL: compilation error – compilation aborted
ORA-06550: line 0, column 0:
PLS-00565: NUMTABLETYPE must be completed as a potential REF target (object type)
反复的报错说PLS-00565的错误。
最后终于找到原因,create or replace并不是100%都能直接修改原有的type定义。
在这里我有两个type:
VARTABLETYPE就可以。
但是 NUMTABLETYPE就是不可以。 就因为正好遇到了两种相反的现象,才折腾了我10多分钟。
最终还是drop掉, 重新create就通过了。
sys@MYORACLE> drop type numtabletype;
Type dropped.
sys@MYORACLE>
sys@MYORACLE>
sys@MYORACLE> CREATE OR REPLACE TYPE NUMTABLETYPE is table of number;
2 /
Type created.
sys@MYORACLE> create or replace function str2numList( p_string in varchar2 ) return numTableType
2 as
3 v_str long default p_string || ‘,’;
4 v_n number;
begin
v_data numTableType := numTableType();
6 begin
loop
8 v_n := to_number(instr( v_str, ‘,’ ));
9 exit when (nvl(v_n, 0) = 0);
10
11 v_data.extend;
12 v_data( v_data.count ) := ltrim(rtrim(substr(v_str, 1, v_n-1)));
13 v_str := substr( v_str, v_n+1 );
14 end loop;
15
16 return v_data;
17 end;
18 /
Function created.
sys@MYORACLE> select a.column_value from table(str2numlist(’12,23′)) a;
COLUMN_VALUE
————
12
23
到此结束。
另外附上support.oracle.com的说明:
Error: PLS-565
Text: %s must be completed as a potential REF target (object type)
—————————————————————————
Cause: Incomplete library units that are potential targets of REF
dependencies must be completed so that they continue to
remain potential targets of REF dependencies (since there might
be library units with REF dependencies on this library unit).
Potential REF targets include complete and incomplete
object types. This error happened because an attempt was made to
complete a potential REF target as something other than a
potential REF target.
Action: Use another name for this library unit, or drop the original
incomplete library unit.
来源:如龙的博客
- PLS-00565的错误解决
- oracle的PLS-00231 错误分析
- 【解决】EXP-00056 ORA-06550 PLS-00302 ORA-06550错误
- Oracle PLS-00103错误
- 也说ORACLE 数据库的 pls-00942 错误
- 解决 PLS-00306: 调用"存储过程名"时参数个数或类型错误
- PLS-00201错怎么解决
- 创建触发器时出现 PLS-00049: 错误的赋值变量 ':NEW.land_name'
- 数据库Server版本造成的导出错误PLS-00302: component 'SET_NO_OUTLINES' must be declared
- 【Oracle 】PL/SQL重用函数调用过程中PLS-307的错误
- 写存储过程时出的错误:PLS-00201: 必须声明标识符
- 创建触发器时出现 PLS-00049: 错误的赋值变量 ':NEW.modify_man'
- oracle触发器编译错误PLS-00103
- ORA-06550, PLS-00302错误处理
- ORA-06553: PLS-801: 内部错误 [56319]
- Oracle最无奈错误PLS-00103
- 关于显示器,神马ips、pls、tn的
- Oracle 存储过程错误之PLS-00201: 必须声明标识符
- android NDK增加log调试
- redis文档
- 浙江大学ACM俱乐部 1036:镂空三角形
- 标签使用
- 初步学习Protected Mode(3)
- PLS-00565的错误解决
- linux scp 无密码复制文件和目录
- 蓝桥杯试题 网络寻路 (构图+深搜)
- 64位 centos 运行 android adb
- Openstack快照现状分析
- 安装hadoop
- 移动终端与服务端维持会话方式
- Java进击(三)容器类
- 前些天用到的SELinux命令