I receive the following error:
The create package operation was not successful for the following reason: ERROR at line 41: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: end not pragma final instantiable order overriding static member constructor map
The code is as follows:
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;
I have commented out the exception, as initially thought this might be a problem, but the error is still there.
Would anyone please help?
You need the following statement at the end of the package body
END update_quantity;