我必须在 pl/sql 中编写一个嵌套的流水线函数,我尝试以下列方式实现它。
create package body XYZ AS
function main_xyz return data_type_1 pipelined is
begin
--code
pipe row(sub_func);
end;
function sub_func return data_type_1 pipelined is
begin
--code
pipe row(sub_func_1);
end;
function sub_func_1 return data_type_1 pipelined is
begin
--code
pipe row(main_abc);
end;
end;
create package body abc AS
function main_abc return data_type_2 pipelined is
var data_type_2;
begin
--code
return var;
end;
end;
但是,我收到以下错误
[错误] PLS-00653:PLS-00653:PL/SQL 范围内不允许聚合/表函数
我哪里错了?是语法还是逻辑?