We help IT Professionals succeed at work.

Split data that is between Commas

64 Views
Last Modified: 2017-03-15
Hi I would like to do this:

I have a column that has data stored in two columns Id, topic

It could look like this

ID.    Topic
1.      ABC, def, this

What I want returned is

1 abc
1 def
1 this

I've tried parsebame but it doesn't do exactly this

Thanks for help !
Comment
Watch Question

CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Nitin SontakkeDeveloper
CERTIFIED EXPERT

Commented:
And just FYI, if you have SQL Server 2016, there is built-in function string_split.
Sharath SData Engineer
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION