1
我創建了一個包,如下面的封裝體:Oracle包創建錯誤
Create or replace Package pkg_1
as
procedure main(param1 varchar2, param2 varchar2, param3 int);
procedure one(param1 varchar2, param2 varchar2);
procedure two(param1 varchar2, param2 varchar2);
end pkg_1;
/
create or replace package body pkg_1
as
procedure main (param1 varchar2, param2 varchar2, param3 int)
is
v_sql_script varchar2(1000);
begin
case param3
when 1 then
v_sql_script := 'begin exec pkg_1.one(:param1,:param2); end;';
execute immediate v_sql_script using param1, param2;
end case;
end;
現在,當我執行與下面的語句封裝過程:
exec pkg_1.main('p1','p2',1);
I got the following error:
ORA-06550: line 1, column 12:
PLS-00103: Encountered the symbol "PKG_1" when expecting one of the following:
:= . (@ % ;
The symbol ":=" was substituted for "PKG_1" to continue.
可有人請建議我什麼我這裏做錯了嗎?
謝謝。
非常感謝。 – niceApp 2010-10-26 20:42:23
是的,是這樣。現在它工作正常。 – niceApp 2010-10-26 20:43:06