Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT [XML_Content].query('<root>{
- for $town in /root/actDate/district/town
- return
- <row townId = "{data($town/@townId)}" districtId="{data($town/../@districtId)}"/>
- }</root>')
- FROM dbo.[Files]
- <root>
- <row townId="0" districtId="0" />
- <row townId="79228162514264337593543950335" districtId="0" />
- <row townId="1" districtId="0" />
- <row townId="79228162514264337593543950334" districtId="79228162514264337593543950335" />
- <row townId="2" districtId="79228162514264337593543950335" />
- <row townId="79228162514264337593543950333" districtId="79228162514264337593543950335" />
- <row townId="3" districtId="1" />
- <row townId="79228162514264337593543950332" districtId="1" />
- <row townId="4" districtId="1" />
- </root>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement