在oracle存储过程时,出现错误:pls-00103:出现符号"insert"在需要下列之一时

2024-11-03 18:36:00
推荐回答(5个)
回答(1):

as 后要写begin
CREATE OR REPLACE PROCEDURE Bomcopy(Oldid VARCHAR2,
Newid VARCHAR2,
USER VARCHAR2,
Company VARCHAR2) AS

begin

INSERT Cc_Record_Bom
SELECT Sys_Guid(),
Item,
Item_Class,
Item_d,
Item_d_Class,
Net_Qty,
Waste_Qty,
Total_Qty,
Bom_Ver,
Start_Date,
End_Date,
Newid,
Remark,
USER,
SYSDATE,
USER,
SYSDATE,
Company
FROM Cc_Record_Bom
WHERE Code = Oldid;

INSERT Cc_Stand_Bom
SELECT Sys_Guid(),
Item,
Item_d,
Net_Qty,
Waste_Qty,
Total_Qty,
Bom_Ver,
Start_Date,
End_Date,
Newid,
Remark,
USER,
SYSDATE,
USER,
SYSDATE,
Company,
Item_Class,
Item_d_Class
FROM Cc_Stand_Bom
WHERE Code = Oldid;

INSERT Cc_Wo_Bom
SELECT Item,
Item_d,
Net_Qty,
Waste_Qty,
Total_Qty,
Bom_Ver,
Start_Date,
End_Date,
Newid,
Remark,
USER,
SYSDATE,
USER,
SYSDATE,
Company,
Item_Class,
Item_d_Class
FROM Cc_Wo_Bom
WHERE Code = Oldid;

END Bomcopy;

回答(2):

在你的每个 inset 后面加上 into

回答(3):

oldId varchar2;
newId varchar2;
user varchar2;
company varchar2;
变没粗量掘族定枯散镇义后用分号;

回答(4):

as后面 要加 BEGIN

回答(5):

哥哥,你的begin呢?开始加个bigin再试试