create or replace procedure p_update_project_status(v_project_id in number(10)) is
declare
v_bid_file_status number(2);
v_bid_form_status number(2);
v_supplier_status number(2);
begin
select status into v_bid_file_status from PROJECT_FILE where type = 0 and associated_project_id = v_project_id;
select status into v_bid_form_status from PROJECT_FILE where type = 1 and associated_project_id = v_project_id;
select status into v_supplier_status from SUPPLIER_INFO where associated_project_id = v_project_id;
if( (v_bid_file_status = 3) and (v_bid_form_status = 3) and (v_supplier_status = 3) ) then
update PROJECT_INFO set status = 3 where id = v_project_id;
else
update PROJECT_INFO set status = 0 where id = v_project_id;
end if;
end;
我执行了该程序,但它无效,我已尽力纠正,但仍然无效。我不知道哪里出错了。请帮帮我
答案 0 :(得分:0)
此处不需要DECLARE关键字。只有在运行匿名块时才需要它。删除它,它应该编译。