I want to update a query to populate the column COST with correct values. I am given the information that ODETAILS has a column called COST, whose value is the product of the quantity and price of the product being ordered. I have come up with a solution. Everything compiles fine, but when I go to check to see if the values have been populated, there is nothing under COST. I was wondering what the problem is. PRODUCTS is a table that has a column PRICE.
CURSOR product_cost IS
FROM ODETAILS, ORDERS, PRODUCTS
WHERE PRODUCTS.PNO = ODETAILS.PNO AND ORDERS.ONO = ODETAILS.ONO
FOR UPDATE OF ODETAILS.COST;
FOR product_rec IN product_cost
SET ODETAILS.COST = (ODETAILS.QTY * myprod)
WHERE CURRENT OF product_cost;