请问该怎样调用下面的存储过程呢
create or replace procedure proForce_Cert(
v_MonthValue in number,
v_CurrentMonthBatch out number
)
as
begin
select count(t.force_cert) into v_CurrentMonthBatch
from t_goods_decl t
where to_char(t.decl_date,'yyyy')=to_char(sysdate,'yyyy')
and to_char(t.decl_date,'mm')=lpad(v_MonthValue,2,'0');
end;
这个存储过程我是在PL/SQL Developer下面写的,我尝试用
declare v_CurrentMonthBatch number;
call proForce_Cert(6,v_CurrentMonthBatch);
print v_CurrentMonthBatch;
去调用,发现会出错,请问究竟要怎样调用才没有问题呢?
create or replace procedure proForce_Cert(
v_MonthValue in number,
v_CurrentMonthBatch out number
)
as
begin
select count(t.force_cert) into v_CurrentMonthBatch
from t_goods_decl t
where to_char(t.decl_date,'yyyy')=to_char(sysdate,'yyyy')
and to_char(t.decl_date,'mm')=lpad(v_MonthValue,2,'0');
end;
这个存储过程我是在PL/SQL Developer下面写的,我尝试用
declare v_CurrentMonthBatch number;
call proForce_Cert(6,v_CurrentMonthBatch);
print v_CurrentMonthBatch;
去调用,发现会出错,请问究竟要怎样调用才没有问题呢?
v_CurrentMonthBatch number;
begin
proForce_Cert(6,v_CurrentMonthBatch);
dbms_output.put_line(v_CurrentMonthBatch);
end;
/
exec proForce_Cert(5,:c);--v_MonthValue需要传入具体的值
print :c;
call proForce_Cert(6,:v_CurrentMonthBatch);
print v_CurrentMonthBatch;
v_CurrentMonthBatch number;
begin
proForce_Cert(6,v_CurrentMonthBatch);
dbms_output.put_line(v_CurrentMonthBatch);
end;