新手,请高手看下这个存储过程哪个地方不对
createorreplaceprocedurepro_OARunTrace(@userid_0number,@userid_1number,@depart_0numbe...
create or replace procedure pro_OARunTrace( @userid_0 number,@userid_1 number,@depart_0 number,@depart_1 number)
as
declare
cursor mrm_data is select userid,userdisplayname from ideal_pub.com_user where userid:=@userid_1;
m_rowtype mrm_data%ROWTYPE;
begin
open mrm_data;
loop
fetch mrm_data into m_rowtype;
exit when(mrm_data%notfound);
update ideal_oa.run_trace set userid=m_rowtype.userid,userdisplayname=m_rowtype.userdisplayname,departID:=@depart_1
where userid:=@userid_0 and flowid=605843 and departid:=@depart_0;
end loop;
close mrm_data;
commit;
end;
exception
when others
then
rollback;
end pro_OARunTrace;
call ideal_pub.pro_OARunTrace (1101490,1101489,16,16) ;
错误是ora-06550 展开
as
declare
cursor mrm_data is select userid,userdisplayname from ideal_pub.com_user where userid:=@userid_1;
m_rowtype mrm_data%ROWTYPE;
begin
open mrm_data;
loop
fetch mrm_data into m_rowtype;
exit when(mrm_data%notfound);
update ideal_oa.run_trace set userid=m_rowtype.userid,userdisplayname=m_rowtype.userdisplayname,departID:=@depart_1
where userid:=@userid_0 and flowid=605843 and departid:=@depart_0;
end loop;
close mrm_data;
commit;
end;
exception
when others
then
rollback;
end pro_OARunTrace;
call ideal_pub.pro_OARunTrace (1101490,1101489,16,16) ;
错误是ora-06550 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询