Open XML document and return for every row, based on row's path to xml file

前端 未结 2 430
难免孤独
难免孤独 2020-12-12 03:30

I\'m pretty new to using XML with TSQL, and recently ran into an issue that I can\'t think around and need your help with.

Scenario: I have a query

2条回答
  •  时光说笑
    2020-12-12 04:09

    You can query the xml as below: Not sure what you are trying to do with GUID.. If you have that column in different table you can do cross apply to below query and get xml's output:

    declare @x xml = '
    TextboxAllocation3 0 TextboxAllocation1 0 TextboxAllocation2 0
    ' Select T.c.value('name[1]', 'varchar(20)') as [Name], T.c.value('value[1]','int') as [Value] from @x.nodes('form/field') T(c)

提交回复
热议问题