quote: Originally posted by Zmeat
SalesOrderID not SalesOrderDetail....i think ive been at my computer too long..
It should be an insert as you need a new record to represent each new item added to cart. so it would be like
INSERT INTO SalesLT.SalesOrderDetail(SalesOrderID, OrderQty, ProductID, UnitPrice, UnitPriceDiscount)
SELECT 71949, 2, ProductID, ListPrice, .1
FROM SalesLT.Product
WHERE Name LIKE 'Water Bottle%'
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|