Quantcast
Channel: Forum SQL Server Setup & Upgrade
Viewing all articles
Browse latest Browse all 7532

comma separated column into rows for each value

$
0
0

experts,

I have a two column table. The second column has comma separated string values. How can I put the values separate for each comma separated and make one row for each value?

example,

column1 |   StringColumn

s1          |   test, joy, happy

s2          |  USA, England, India

I want the result to be like below

column1   |     StringColumn

s1            |      test

s1            |      joy

s1            |      happy

s2            |     USA

s2            |     England

s2            |     India

thanks in advance


ebro


Viewing all articles
Browse latest Browse all 7532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>