Help debugging Procedure
Date: 21 Feb 2002 09:37:25 -0800
Message-ID: <4675dea.0202210937.271be18f_at_posting.google.com>
I am trying to create the following procedure in oracle. The schema manager, for some reason, isn't showing me the errors in it. Can someone please take a quick look and see if anything jumps out at them? Here is the procedure itself:
CREATE PROCEDURE book_calculations(bid NUMBER,
oiid NUMBER)
IS
DECLARE
vQty NUMBER(2);
vCost NUMBER(6,2);
vCharge Number(6,2);
BEGIN
Select COUNT(BOOK_ID) into vQty from ORDER_ITEM where book_id = bid;
Update book_info set total_sold = vQty where book_id = bid;
Select SUM(price * qty_order) into vCost from BOOK_INFO, ORDER_ITEM
Where order_id = oiid AND book_info.book_id = order_item.book_id;
Select (SHIP_CHARGE + SALES_TAX) into vCharge where order_id = oiid;
Update order_info set total_cost = (vCost + vCharge) where order_id = oiid;
END book_calculations;
Here is where I call the procedure, and assign the bid and oiid values...
book_calculations (bid=> Bookid,
oiid=> Orderid);
(bookid and orderid are variables created in the trigger that is calling the procedure)
Thanks!
Sarah Received on Thu Feb 21 2002 - 18:37:25 CET