Sorry, it looks Like it was INSERT INTO instead of SELECT INTO. Here's the query I use, perhaps you can modify it for your own purposes:
- Code: Select all
INSERT INTO tblOrderItem
SELECT @orderID as 'orderid',
P.productid,
multiple as 'quantity',
P.Price as 'price'
FROM tblBasketItems
INNER JOIN tblProducts P
ON P.ProductID = tblBasketItems.ProductID
WHERE tblBasketItems.basketID = @basketID