Unanswered: How to transfer data from one table to another?
I have a temporary shoppingcart-table that I want to transfer to an OrderDetail-table. See following code:
CREATE PROCEDURE add_orderdetails
BEGIN TRAN AddOrderDetail
INSERT INTO OrderDetails
(OrderID, ProductID, Quantity, Price)
(@OrderID, SELECT ProductID, Quantity, Price FROM Cart WHERE CartID=@CartID)
COMMIT TRAN AddOrderDetail
The OrderID and CartID are inputs from an asp-page.
I got an syntax-error near SELECT and ')'.
I hope someone is able to help me with this. I will be very grateful!