Update Query said ORDER_DETAILS.QUANTITY
is an invalid identifier. I check and there is a table named ORDER_DETAILS
with a field named QUANTITY
.
Error at Command Line : 14 Column : 57
Error report -
SQL Error: ORA-00904: "ORDER_DETAILS"."QUANTITY": invalid identifier
00904. 00000 - "%s: invalid identifier"
///////////////////////////////////////////////
UPDATE
(SELECT Orders.Order_ID, Order_Details.Quantity, Products.Units_In_Stock, Orders.Shipped_Date, Orders.This_Order_Was_Shipped
FROM Products
INNER JOIN Orders
INNER JOIN Order_Details ON Orders.Order_ID = Order_Details.Order_ID ON Products.Product_ID = Order_Details.Product_ID
WHERE ((Orders.Shipped_Date Is Not Null) AND (Orders.This_Order_Was_Shipped='YES')))
SET Products.Units_In_Stock = Products.Units_In_Stock - Order_Details.Quantity;