Results 1 to 10 of 10
Sep 12, 2012, 12:54 #1
- Join Date
- May 2008
- 0 Post(s)
- 0 Thread(s)
Looking for help with a SQL Query
I have a table called Orders and another table called OrderDetails.
My Order table contains information about the order (who placed it, OrderDate, their BilltoID, etc)
The OrderDetails table contains line by line information about what products were part of the order. Example, productID, ProductName, productType, etc.
I have to begin with a query giving a list of the orders based on their BilltoID. That query is:
SELECT o.ID,OrderDate,ShipDate,CALC_GrandTotal,ShipTrackingNum,o.ShipType, CASE ost.Name WHEN 'Taken' THEN 'In Progress' ELSE ost.Name END AS OrderStatus FROM vwOrders o INNER JOIN vwOrderStatusTypes ost ON o.OrderStatusID=ost.ID WHERE BillToID= 123456