17,377
社区成员
发帖
与我相关
我的任务
分享
declare
AALEVEL_ number;
temp_ number;
PARENT_DOP_ORDER_ID_ number;
tempa_ number;
begin
select DOP_STRUCTURE_LEVEL, QTY_PER_ASSEMBLY, PARENT_DOP_ORDER_ID
into AALEVEL_, temp_, PARENT_DOP_ORDER_ID_
from X_CPWLXHQD
where PART_NO = '15010011'
and DOP_ORDER_ID = '22';
WHILE AALEVEL_ <> 0 LOOP
select DOP_STRUCTURE_LEVEL, QTY_PER_ASSEMBLY, PARENT_DOP_ORDER_ID
into AALEVEL_, tempa_, PARENT_DOP_ORDER_ID_
from X_CPWLXHQD
where DOP_ORDER_ID = 21
and DOP_STRUCTURE_LEVEL = 3;
temp_ := tempa_ * temp_;
AALEVEL_ := AALEVEL_ - 1;
end loop;
end;