我必须在我的存储过程中使用一个数组。所以我创建了一个类型变量:
CREATE OR REPLACE TYPE integer_array is table of number;
然后我尝试编写我的存储过程,但我无法编译它:
create or replace
PROCEDURE SP_TEST(
i_id_profiles in integer_array,
o_clients OUT SYS_REFCURSOR
)
AS
BEGIN
open o_clients for
FOR i IN 1..i_id_profiles.count LOOP
select a.id_client from b_client a, i_client_profile b where a.id_client = b.id_client
and b.id_profile = i_id_profiles(i);
END LOOP;
END SP_TEST;
你能帮助我吗?我想获得我选择的 SYS_REFCURSOR。
谢谢
错误:
PLS-00103:当期望以下之一时遇到符号“FOR”:( - + case mod new not null select with
continue avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date pipePLS-00103:在预期以下情况之一时遇到符号“文件结尾”:结束不是 pragma 最终实例化顺序覆盖静态成员构造函数映射