create or replace procedure p_update_project_status(v_project_id 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;

pls 00905 object is invalid
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-