SQL: Xml Queries - XQuery, Relative and Absolute Pathing

Post on 20-Jan-2017

894 Views

Category:

Software

1 Downloads

Preview:

Click to see full reader

Transcript

XML Queries

Presentation by Aaron BumaDevelopment DBA

Session Overview

• The XML Data Type

• Relative Element Paths

• Absolute Element Paths

• The “data” method

XML Data Type

• It can be used with variables:

• It can be a column type:

Relative Pathing

• Using [n] to choose the 1st, 2nd, or nth node

Absolute Pathing

• Filtering on a value, returning a set of nodes

“data” Method

• Wraps the XQuery path you define• Returns the element values (not attribute values)

DEMO

Questions?• The XML Data Type• Relative Element Paths• Absolute Element Paths• The “data” function

Presentation Recording, Slides and Scripts– Available at:

http://www.aaronbuma.com/category/sql-training/

top related