Re: Help debugging Procedure

From: Paul <silver_bmw_z3_at_hotmail.com>
Date: 5 Mar 2002 05:34:17 -0800
Message-ID: <f43c8ad5.0203050534.14fffcb8_at_posting.google.com>


Hi Sarah,

I'm a bit rustyGot a feeling it might be that the following line has no FROM clause !!!

>>>>> Select (SHIP_CHARGE + SALES_TAX) into vCharge where order_id = oiid;

Regards,

Paul

sarah_at_frogtree.com (Sarah Kulp) wrote in message news:<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 Tue Mar 05 2002 - 14:34:17 CET

Original text of this message