Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ElementA>
- <ElementAA>false</ElementAA>
- <ElementAB>
- <SubElementB>-1</SubElementB>
- <SubElementB>2</SubElementB>
- <SubElementB>3</SubElementB>
- <SubElementB>-4</SubElementB>
- </ElementAB>
- <ElementAC>Some text for element AC</ElementAC>
- </ElementA>
- select
- m.c.value('(ElementAA/.)[1]', 'bit') as ElementAA,
- m.c.value('(ElementAB/.)[1]', 'nvarchar(max)') as ElementAB,
- m.c.value('(ElementAC/.)[1]', 'nvarchar(max)') as ElementAC
- from
- sqm as s
- cross apply
- s.data.nodes('Sqm/ElementA') as m(c)
- ElementAA | ElementAB | ElementAC
- false | -123-4 | Some text for element AC
- ElementAA | ElementAB | ElementAC
- false | -1,2,3,-4 | Some text for element AC
- ╔═══════════╦═══════════╦══════════════════════════╗
- ║ ElementAA ║ ElementAB ║ ElementAC ║
- ╠═══════════╬═══════════╬══════════════════════════╣
- ║ 0 ║ -1,2,3,-4 ║ Some text for element AC ║
- ╚═══════════╩═══════════╩══════════════════════════╝
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement