标签:varchar 根据 outer sele select val out app XML
SELECT B.value FROM ( SELECT [value] = CONVERT(xml,‘<root><v>‘ + REPLACE(‘A,C,D‘, ‘,‘, ‘</v><v>‘) + ‘</v></root>‘) ) A OUTER APPLY ( SELECT value = N.v.value(‘.‘, ‘varchar(100)‘) FROM A.[value].nodes(‘/root/v‘) N(v) ) B
结果:
A
C
D
标签:varchar 根据 outer sele select val out app XML
原文地址:https://www.cnblogs.com/bjhblogs/p/12202688.html