1 select sourceuid from wmsunpack where state = 9
查询后的结果
更改sql 语句为
1 select b.col2 from 2 (select sourceuid,col2=convert(xml,' <root> <v>'+replace(sourceuid,',',' </v> <v>')+' </v> </root>') from wmsunpack where state = 9)w 3 outer apply 4 (select col2=c.v.value('.','nvarchar(100)') from w.col2.nodes('/root/v')c(v)) b
查询结果