Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Cursor help needed
I have written the following code to sum items that are from a specific purchase order number. This code does work, except for the very first time it executes each time the form is run. I do not know much about cursors so I am hoping someone out there could point out what I have done wrong...
I am using forms 4.0.12, oracle 7.0.16 on a Sun Unix system...
thanks,
tanya george
tanyag_at_erc.msstate.edu
declare
CURSOR po_values(po# in inv_part.purchase_order_no%TYPE) is
SELECT cost from inv_part where purchase_order_no = po#; temp inv_part.cost%TYPE;
begin
:po.dummy_total := 0.0;
FOR rec in po_values(:acquisitions.purchase_order_no) LOOP
:po.dummy_total := :po.dummy_total + nvl(rec.cost,0);
END LOOP; end; Received on Thu Mar 16 1995 - 18:36:24 CST
![]() |
![]() |