Turn CSV Filed into into individual rows in Sql-Server

علی ذوالفقار
1401/01/16 15:11:36 (162)
SELECT A.OtherID,  
     Split.a.value('.', 'VARCHAR(100)') AS Data  
 FROM  
 (
     SELECT OtherID,  
         CAST ('< M >' + REPLACE(Data, ',', '< /M >< M >') + '' AS XML) AS Data  
     FROM  Table1
 ) AS A CROSS APPLY Data.nodes ('/M') AS Split(a); 
Back