oracle测试存储过程的问题

[复制链接]
查看11 | 回复1 | 2011-4-18 10:30:49 | 显示全部楼层 |阅读模式
begin
-- Call the procedure
user_ah.scm_gensalinvoice_ah_new(an_invoiceseq => :an_invoiceseq,

an_compid => :an_compid,

an_ownerid => :an_ownerid,

an_saledeptid => :an_saledeptid,

as_flowid => :as_flowid,

as_invtype => :as_invtype,

as_invbegincode => :as_invbegincode,

as_invtypecode => :as_invtypecode,

as_optmode => :as_optmode,

as_billsrc => :as_billsrc,

as_optstep => :as_optstep,

an_createuser => :an_createuser,

ai_rtd => :ai_rtd,

as_endinvoiceno => :as_endinvoiceno,

as_rmsg => :as_rmsg);
end;
If (as_invtype not in ('00','10')) or as_invtype is null then

ai_rtd:= -1;

as_Rmsg := 'as_invtype传入参数错误';

return ;
end If;
测试结果如图
后来我用test
declare
an_invoiceseq Float;
an_compid Float;
an_ownerid Float;
an_saledeptid Float;
as_flowid String;
as_invtype String;
as_invbegincode String;
as_invtypecode String;
as_optmode String;
as_billsrc String;
as_optstep String;
an_createuser Float;
ai_rtd Float;
as_endinvoiceno String;
as_rmsg String;
begin
user_ah.scm_gensalinvoice_ah_new(/*an_invoiceseq =>*/ 156443,/*an_compid =>*/ 1,/*an_ownerid =>*/ 1,/*an_saledeptid =>*/ 201,/*as_flowid =>*/ '',/*as_invtype =>*/ '00'
,/*as_invbegincode =>*/ '00072839',/*as_invtypecode =>*/ '123456',/*as_optmode =>*/ '00',/*as_BillSrc =>*/ '',/*as_optstep =>*/ ''
,/*an_createuser =>*/ 0,/*ai_Rtd => */:ai_rtd,/*as_endinvoiceno =>*/ :as_endinvoiceno,/*as_Rmsg =>*/ :as_rmsg);
end;
就报“并非所有变量都已绑定”,为什么啊?我才学oracle,还是新手,请高手指教


回复

使用道具 举报

千问 | 2011-4-18 10:30:49 | 显示全部楼层
end放错地方了吧还有就是语句块里就那么一句话,你带那么多参数干嘛。累赘
回复

使用道具 举报

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

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行