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';
end; WHILE AALEVEL_<>0 LOOP
begin
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;
这是本人在oracle的一个函数中的一段代码,在调试时出现这个错误:
ORA-06550:line 7,coumln 3:
PLS-00103:Encounttered the symbol "WHILE"
请教这个错误是什么错误,应如何解决
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';
end; WHILE AALEVEL_<>0 LOOP
begin
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;
这是本人在oracle的一个函数中的一段代码,在调试时出现这个错误:
ORA-06550:line 7,coumln 3:
PLS-00103:Encounttered the symbol "WHILE"
请教这个错误是什么错误,应如何解决
exit while AALEVEL_ =0;
是一对啊,期间写不循环的判断
PLS-00103:Encounttered the symbol "WHILE" 应该没问题啊,检查下拼写标点呢
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;