How to split strings in SQL Server

Viewed 66363

I have the following input:

Data
-----
A,10
A,20
A,30
B,23
B,45

Expected output:

col1  Col2
----  -----
A      10
A      20
A      30
B      23
B      45

How can I split the string to produce the desired output?

5 Answers
Related