Date post: | 20-Jan-2017 |
Category: |
Software |
Upload: | aaron-buma |
View: | 438 times |
Download: | 1 times |
XML Data Binding
Presentation by Aaron BumaDevelopment DBA
What is “XML binding”
• Treating XML like a dataset that can be joined or referenced as a table in memory
Binding XML to SQL
• Using CROSS APPLY to combine XML data to a table• .Nodes() is used to pick the level of ‘rows’– Uses Xpath parameter– similar to a ‘join’
• .Value() is used to return data from the XML ‘rows’
Binding SQL into XML• Using Xpath to select Node level
• FLWOR to iterate over each node– For, Let, With, Order By, Return
• Custom Tags
• SQL Column References
DEMO
Review• Definition• Putting XML into SQL • Putting SQL into XML
Presentation Recording, Slides and Scripts– Available at:
http://www.aaronbuma.com/category/sql-training/– Contact:
Email: [email protected]