sql语句的问题...请教大家.......?????????
create or replace procedure SQ_BIAO(StartTime in varchar2)
AS
begin
DELETE from rp_Acto;
declare
SW1 number(8,2);
SW2 number(8,2);
begin
select sum(a.ammounthm+a.ammountscrap+a.AMMOUNTPIGIRON)/sum(b.slab_weight) into SW1
from da_bof_report a,da_ccm1_slab_summary b
where b.heat_number in
(
select heatid from da_bof_report
where to_date(to_char(time_stamp,'YYYY-MM-DD'),'YYYY-MM-DD')=TO_DATE(StartTime,'YYYY-MM-DD')
and operatorid='1'
);
if (SW1 is null) then
SW1:=0;
end if;
-------------上面这句没有问题-主要是下面这句----------
select sum(a.ammounthm+a.ammountscrap+a.AMMOUNTPIGIRON)/sum(b.slab_weight) into SW2
from da_bof_report a,da_ccm1_slab_summary b
where b.heat_number in
(
select heatid from da_bof_report
where to_date(to_char(time_stamp,'YYYY-MM-DD'),'YYYY-MM-DD')>to_date(substr(StartTime,0,8)||'01','YYYY-MM-DD')
and to_date(to_char(time_stamp,'YYYY-MM-DD'),'YYYY-MM-DD')<to_date(StartTime,'YYYY-MM-DD')
and operatorid='1'
);
insert into rp_acto(dang_ri_jia)
values(SW2/SW1);
COMMIT;
END;
end SQ_BIAO;
--------------------编程问答-------------------- 不知道你要问的是什么问题?????
补充:.NET技术 , C#