调用 Oracle PL/SQL PLS-00201:必须声明标识符“001" [英] Calling Oracle PL/SQL PLS-00201: identifier '001' must be declared

查看:155
本文介绍了调用 Oracle PL/SQL PLS-00201:必须声明标识符“001"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下标头调用 PL/SQL 脚本:

I am trying to call a PL/SQL script with the following header:

PL/SQL:

CREATE OR REPLACE PROCEDURE GETQUOTE(i_QUOTEID IN HR.QUOTEID,
                                     o_QUOTE OUT HR.QUOTE)

执行命令:

DECLARE c VARCHAR2(100);

BEGIN

  HR.GETQUOTE("001", c);

END;
/

错误:

declare
c varchar2(100);
begin
HR.GETQUOTE("001", c);
end;

ORA-06550: line 4, column 29:
PLS-00201: identifier '001' must be declared
ORA-06550: line 4, column 1:
PL/SQL: Statement ignored

推荐答案

使用单引号:

然后

检查第一个值是否是过程中的字符串而不是数字.你也可以试试 to_number('001') 作为参数

check that the first value is a string not a number inside the procedure. you may also try to_number('001') as the argument

这篇关于调用 Oracle PL/SQL PLS-00201:必须声明标识符“001"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆