DECLARE @ItemMessage XML SET @ItemMessage=cast(N'1 2 ' as xml)SELECT T.c.value('@id','uniqueidentifier') as id, T.c.value('@value','decimal(12,5)') as value,T.c.value('(C/text())[1]','int') as cFROM @ItemMessage.nodes('A/B') AS T(c)
本文共 298 字,大约阅读时间需要 1 分钟。
DECLARE @ItemMessage XML SET @ItemMessage=cast(N'1 2 ' as xml)SELECT T.c.value('@id','uniqueidentifier') as id, T.c.value('@value','decimal(12,5)') as value,T.c.value('(C/text())[1]','int') as cFROM @ItemMessage.nodes('A/B') AS T(c)
转载地址:http://yzlja.baihongyu.com/