Using classic T-SQL if we wanted to get all this data out we could join the two tables and then we would get a longer flat record that repeated the data for the order in every record as shown below.
select
*
from
[
Order
]
JOIN
OrderLine
ON
Id = OrderId
FOR
XML AUTO, ELEMENTS
The resulting XML is also very simple as shown below.
<
>
Id
>47</
OrderNumber
>3774632</
CustomerName
>John Doe</
CustomerAddress1
>123 Fake St</
CustomerState
>IL</
OrderTotal
>247.54</
>49</
OrderId
ItemNumber
>54346</
Quantity
>1</
UnitCost
>2.475400000000000e+002</
Description
>Some Item</
</
>50</
>44352</
>2</
>1.542500000000000e+002</
>Another Item</
Read suggested related topics:
Another important place to find a huge amount of BizTalk related articles is the TechNet Wiki itself. The best entry point is BizTalk Server Resources on the TechNet Wiki.
Maheshkumar S Tiwari edited Revision 13. Comment: Minor formatting around See also
Steef-Jan Wiggers edited Revision 12. Comment: Added resource link
Naomi N edited Revision 10. Comment: Minor edit
Sandro Pereira edited Revision 9. Comment: Fixing text and picture format
Steef-Jan Wiggers edited Revision 8. Comment: Fixed formatting
Steef-Jan Wiggers edited Revision 7. Comment: Formatting
Steef-Jan Wiggers edited Revision 6. Comment: Minor edits
Richard Mueller edited Revision 4. Comment: Modified title casing, added tag
Great article, good work Dan!
Where is the use of WCF-SQL with XML?
Excellent
Nice work