0

我收到以下错误:

由于以下原因,创建包操作不成功:第 41 行的错误:PLS-00103:在预期以下情况之一时遇到符号“文件结束”:end not pragma final instantiable order overriding static member constructor map

代码如下:

CREATE OR REPLACE PACKAGE BODY update_quantity 
IS

PROCEDURE set_new_quantity(product_idProduct IN NUMBER, order_idOrder IN NUMBER, newquantity IN    NUMBER)
IS
BEGIN
 UPDATE Order_item o
 SET o.quantity = newquantity
 WHERE o.product_idProduct = product_idProduct     
        AND o.order_idOrder = order_idOrder; 

--EXCEPTION
      --WHEN NO_DATA_FOUND THEN
 --RAISE_APPLICATION_ERROR (-20100, 'No such quantity or order');

END set_new_quantity;

FUNCTION FUNCTION existing_quantity_f(product_idProduct IN NUMBER, order_idOrder IN NUMBER)  RETURN NUMBER

IS

existing_newquantity NUMBER(4);

BEGIN
SELECT o.quantity INTO existing_newquantity 
FROM ORDER_item o
WHERE
        o.product_idProduct = product_idProduct     
        AND o.order_idOrder = order_idOrder; 

RETURN (existing_newquantity);

--EXCEPTION
     -- WHEN NO_DATA_FOUND THEN
--RAISE_APPLICATION_ERROR (-20100, 'No such employee or project');

END existing_quantity_f;

我已经注释掉了异常,因为最初认为这可能是一个问题,但错误仍然存​​在。

有人可以帮忙吗?

4

1 回答 1

2

您需要在包体的末尾添加以下语句

END update_quantity;
于 2012-05-03T17:12:44.377 回答