SHOW:
|
|
- or go back to the newest paste.
| 1 | - | <ElementA> |
| 1 | + | <ElementA> |
| 2 | - | <ElementAA>false</ElementAA> |
| 2 | + | <ElementAA>false</ElementAA> |
| 3 | - | <ElementAB> |
| 3 | + | <ElementAB> |
| 4 | - | <SubElementB>-1</SubElementB> |
| 4 | + | <SubElementB>-1</SubElementB> |
| 5 | - | <SubElementB>2</SubElementB> |
| 5 | + | <SubElementB>2</SubElementB> |
| 6 | - | <SubElementB>3</SubElementB> |
| 6 | + | <SubElementB>3</SubElementB> |
| 7 | - | <SubElementB>-4</SubElementB> |
| 7 | + | <SubElementB>-4</SubElementB> |
| 8 | - | </ElementAB> |
| 8 | + | </ElementAB> |
| 9 | - | <ElementAC>Some text for element AC</ElementAC> |
| 9 | + | <ElementAC>Some text for element AC</ElementAC> |
| 10 | </ElementA> | |
| 11 | ||
| 12 | - | select |
| 12 | + | select |
| 13 | - | m.c.value('(ElementAA/.)[1]', 'bit') as ElementAA, |
| 13 | + | m.c.value('(ElementAA/.)[1]', 'bit') as ElementAA,
|
| 14 | - | m.c.value('(ElementAB/.)[1]', 'nvarchar(max)') as ElementAB, |
| 14 | + | m.c.value('(ElementAB/.)[1]', 'nvarchar(max)') as ElementAB,
|
| 15 | - | m.c.value('(ElementAC/.)[1]', 'nvarchar(max)') as ElementAC |
| 15 | + | m.c.value('(ElementAC/.)[1]', 'nvarchar(max)') as ElementAC
|
| 16 | - | from |
| 16 | + | from |
| 17 | - | sqm as s |
| 17 | + | sqm as s |
| 18 | - | cross apply |
| 18 | + | cross apply |
| 19 | s.data.nodes('Sqm/ElementA') as m(c)
| |
| 20 | ||
| 21 | - | ElementAA | ElementAB | ElementAC |
| 21 | + | ElementAA | ElementAB | ElementAC |
| 22 | false | -123-4 | Some text for element AC | |
| 23 | ||
| 24 | - | ElementAA | ElementAB | ElementAC |
| 24 | + | ElementAA | ElementAB | ElementAC |
| 25 | false | -1,2,3,-4 | Some text for element AC | |
| 26 | ||
| 27 | - | ╔═══════════╦═══════════╦══════════════════════════╗ |
| 27 | + | ╔═══════════╦═══════════╦══════════════════════════╗ |
| 28 | - | ║ ElementAA ║ ElementAB ║ ElementAC ║ |
| 28 | + | ║ ElementAA ║ ElementAB ║ ElementAC ║ |
| 29 | - | ╠═══════════╬═══════════╬══════════════════════════╣ |
| 29 | + | ╠═══════════╬═══════════╬══════════════════════════╣ |
| 30 | - | ║ 0 ║ -1,2,3,-4 ║ Some text for element AC ║ |
| 30 | + | ║ 0 ║ -1,2,3,-4 ║ Some text for element AC ║ |
| 31 | ╚═══════════╩═══════════╩══════════════════════════╝ |