查詢後的結果 更改SQL 語句為 查詢結果 ...
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
查詢結果