Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How to split string into row's data?

$
0
0

I have data like :

col1  col2

1      ab

2      ba

3      bc

I want to put these data into rows like:

col1 col2

1      a

1      b

2      b

2      a

3      b

3      c

Thanks in advance.

I am using SQL server 2005.

Viewing all articles
Browse latest Browse all 23857

Trending Articles