我正在尝试运行一个具有多个输入和输出参数的存储过程。该过程只能通过导航在“连接”面板中查看
Other Users | <user> | Packages | <package> | <procedure>
如果我右击,菜单项是“订购成员由...”和“创建单元测试”(灰色)。当用户访问该过程时,“运行”该过程的能力似乎是不可能的。
我一直试图找到一个例子,说明如何创建一个匿名块,以便我可以运行的过程作为一个 SQL 文件,但没有找到任何工作。
有人知道我如何在 SQL Developer 中执行这个过程吗? 我使用的是2.1.1.64版本。
编辑1:
我要调用的程序有这样的签名:
user.package.procedure(
p_1 IN NUMBER,
p_2 IN NUMBER,
p_3 OUT VARCHAR2,
p_4 OUT VARCHAR2,
p_5 OUT VARCHAR2,
p_6 OUT NUMBER)
如果我这样写我的匿名块:
DECLARE
out1 VARCHAR2(100);
out2 VARCHAR2(100);
out3 VARCHAR2(100);
out4 NUMBER(100);
BEGIN
EXECUTE user.package.procedure (33,89, :out1, :out2, :out3, :out4);
END;
我得到了一个错误:
Bind Varialbe "out1" is NOT DECLCARED
anonymous block completed
我试过初始化 out * 变量:
out1 VARCHAR2(100) := '';
但得到同样的错误:
编辑2:
根据 Alex 的回答,我试着去掉前面的冒号,然后发现了这个:
Error starting at line 1 in command:
DECLARE
out1 VARCHAR2(100);
out2 VARCHAR2(100);
out3 VARCHAR2(100);
out4 NUMBER(100);
BEGIN
EXECUTE user.package.procedure (33,89, out1, out2, out3, out4);
END;
Error report:
ORA-06550: line 13, column 17:
PLS-00103: Encountered the symbol "USER" when expecting one of the following:
:= . ( @ % ; immediate
The symbol ":=" was substituted for "USER" to continue.
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action: