I have 3 tables:
Orders
Shipments
Reporting
Shipments holds shipping cost (there can be multiple records per order since there can be multiple shipments per order). Primary key is Shipping ID.
Orders holds Shipping ID and Order ID.
Reporting holds Order ID.
I need to update the Reporting table with the total shipping cost from Shipments.
Here's my query:
UPDATE [Reporting] R SET Shipping =
(SELECT Sum([TotalCharges])
FROM Shipments S, Orders O
WHERE S.OrderID = O.OrderID
and O.[OrderNumber] = P.[Order Number]
Group by O.[OrderNumber])
Access throws back an error: "Operation Must Use an Updateable Query".
Any help would be greatly appreciated.
Orders
Shipments
Reporting
Shipments holds shipping cost (there can be multiple records per order since there can be multiple shipments per order). Primary key is Shipping ID.
Orders holds Shipping ID and Order ID.
Reporting holds Order ID.
I need to update the Reporting table with the total shipping cost from Shipments.
Here's my query:
UPDATE [Reporting] R SET Shipping =
(SELECT Sum([TotalCharges])
FROM Shipments S, Orders O
WHERE S.OrderID = O.OrderID
and O.[OrderNumber] = P.[Order Number]
Group by O.[OrderNumber])
Access throws back an error: "Operation Must Use an Updateable Query".
Any help would be greatly appreciated.