oracle存储过程编译错误:PLS-00103: 出现符号 "end-of-file"在需要下列之一时

2024-11-15 10:25:55
推荐回答(3个)
回答1:

for 循环就不需要打开关闭游标了,他自动就打开关闭了
还有你上面不是2个LOOP吗
结束就应该是2个END LOOP
start_date datet;这个数据该是date

这样试试
CREATE OR REPLACE Procedure Up_Cc_Stand_Bom_Io As
Cursor Cor Is
Select Item,
Item_Class,
Item_d,
Item_d_Class,
Net_Qty,
Start_Date,
End_Date,
Remark
From Cc_Stand_Bom_Temp_Io;

Item Varchar2(128);
Item_Class Varchar2(1);
Item_d Varchar2(128);
Item_d_Class Varchar2(1);
Net_Qty Number(18, 8);
Start_Date Datet;
End_Date Date;
Remark Varchar2(256);
v_Count Number;
Rec_Cor Cor%Rowtype;
Begin
For Rec_Cor In Cor Loop

While Fetch_Status = 0 Loop
Select Count(*)
Into v_Count
From Cc_Stand_Bom_Io
Where Item = Item
And Item_d = Item_d
And Start_Date = Start_Date;
If v_Count > 0 Then
Delete From Cc_Stand_Bom_Io
Where Item = Item
And Item_d = Item_d
And Start_Date = Start_Date;
End If;
Insert Into Cc_Stand_Bom_Io
(Item,
Item_Class,
Item_d,
Item_d_Class,
Net_Qty,
Waste_Qty,
Total_Qty,
Start_Date,
End_Date,
Remark)
Values
(Item,
Item_Class,
Item_d,
Item_d_Class,
Net_Qty,
0,
Net_Qty,
Start_Date,
End_Date,
Remark);
Delete From Cc_Stand_Bom_Temp_Io;
End Loop;
End Loop;
End Up_Cc_Stand_Bom_Io;

回答2:

rubbish!rubbish!

回答3:

最后少end