|
Posted by CK on 11/20/06 17:43
USE AdventureWorks
GO
-- Retrieve order manifest
SELECT SalesOrder.SalesOrderID,
SalesOrder.OrderDate,
SalesOrder.AccountNumber,
SalesOrder.Comment,
Item.ProductID,
Item.OrderQty
FROM Sales.SalesOrderHeader SalesOrder
JOIN Sales.SalesOrderDetail Item
ON SalesOrder.SalesOrderID = Item.SalesOrderID
WHERE SalesOrder.SalesOrderID = 43659
1. Examine the query in the file, noting that it retrieves data from the
Sales.SalesOrderHeader and Sales.SalesOrderDetail tables in the
AdventureWorks database.
2. ON the toolbar, click Execute.
3. Review the query results.
?Modify the query to retrieve <row> elements
1. Make the necessary changes to the query to return the data in the
following XML format (hint: use FOR XML).
Thanks In Advance,
~CK
Navigation:
[Reply to this message]
|