2 u013351347 u013351347 于 2014.11.27 21:26 提问

pls 00905 object is invalid
pls

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;

2个回答

bw555
bw555   Ds   Rxr 2014.11.27 21:27
已采纳

把decalre这行删掉

u013351347
u013351347 谢谢
3 年多之前 回复
arlen1990
arlen1990   Rxr 2014.12.01 09:39

create or replace procedure p_update_project_status(v_project_id number) is
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;
commit;
else
update PROJECT_INFO set status = 0 where id = v_project_id;
commit;
end if;
end;

u013351347
u013351347 太感谢了,那天我问老师,老师半天也答不上来
3 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!