SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL CRUD help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Zmeat
Starting Member

7 Posts

Posted - 03/12/2013 :  19:46:47  Show Profile  Reply with Quote
Post can be deleted! :-)

Edited by - Zmeat on 03/13/2013 00:49:55

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 03/13/2013 :  00:21:30  Show Profile  Reply with Quote
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/

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 03/13/2013 :  00:52:37  Show Profile  Reply with Quote
quote:
Originally posted by Zmeat

Id like to set variables for the id of the CustomerID and for the SaleOrderID but not 100% sure the right syntax for it. Going to be my next step.


do you mean variables for passing values? they're called parameters

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 03/13/2013 :  00:53:52  Show Profile  Reply with Quote
quote:
Originally posted by Zmeat

Post can be deleted! :-)


Please dont remove questions once you get answer. Somebody will benefit out of this discussion at a later point. removing question will not help them to understand what scenario was

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000