PL/SQL:ORA-22905:无法从非嵌套表项访问行

发布时间 2023-05-04 13:54:51作者: samrv

 

ORA-06550:第11行,第25列:
PLS-00642: 在SQL语句中不允许使用本地收集类型
ORA-06550:第11行,第2列
PL/SQL:ORA-22905:无法从非嵌套表项访问行
ORA-06550:第8行,第3列:
PL/SQL:SQL Statement ignored

 

 

解决方式: 表值函数返回必须使用PIPELINED关键字。

function get_lead_time_ft(
p_top_item_id in number,
p_organization_id in number,
p_quantity in number
) return leadtime_tbl_type pipelined;

 

 函数体用 PIPE ROW(LEATIME_REC); 返回表值集。