Rajesh
Wednesday, March 19, 2014
SQL : Split string into Column
SELECT Split.a.value('.', 'VARCHAR(24)') AS String
FROM (SELECT CAST ('<M>' + REPLACE('331AW150A01F01,331AW250A01F01,331AW350A01F01,331WF450A01F01', ',', '</M><M>') + '</M>' AS XML) AS String )
AS A CROSS APPLY String.nodes ('/M') AS Split(a);
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)