存储过程的 参数问题

[复制链接]
查看11 | 回复4 | 2007-10-20 08:38:44 | 显示全部楼层 |阅读模式
大家看图,PL SQL 传 集合类型的参数怎么传啊
回复

使用道具 举报

千问 | 2007-10-20 08:38:44 | 显示全部楼层
参数是什么类型的? 把代码贴出来方便解决问题!
回复

使用道具 举报

千问 | 2007-10-20 08:38:44 | 显示全部楼层
原帖由 bell6248 于 2008-12-31 13:25 发表
参数是什么类型的? 把代码贴出来方便解决问题!

我希望可以传,集合类型的,比如数组之类的
回复

使用道具 举报

千问 | 2007-10-20 08:38:44 | 显示全部楼层
---隨便帖一點
declare
v_odrm odrm%rowtype;
type t_index_odrm is table of odrm%rowtype index by binary_integer;
v_index_odrm t_index_odrm;
procedure pro_1(i_odrm in odrm%rowtype) as--記錄傳遞
begin
dbms_output.put_line(i_odrm.fact_no);
dbms_output.put_line(i_odrm.fact_odr_no);
end;
function fun_1(i_index_odrm in t_index_odrm)--數組傳遞
return booleanis
i int;
begin
i := i_index_odrm.first;
while i is not nullloop

v_odrm.fact_odr_no := i_index_odrm(i).fact_odr_no;
v_odrm.fact_no := i_index_odrm(i).fact_no;
pro_1(v_odrm);
i := i_index_odrm.next(i);
end loop;
return true;
end;
begin
select * bulk collect into v_index_odrm from odrm;

if fun_1(v_index_odrm) then
dbms_output.put_line('OK!');
end if;
end;
回复

使用道具 举报

千问 | 2007-10-20 08:38:44 | 显示全部楼层
存储过程 游标不能作为输入参数吧
可以用内存表来解决
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行