Avatar of Auerelio Vasquez
Auerelio Vasquez
Flag for United States of America asked on

Split data that is between Commas

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 !
Microsoft SQL Server

Avatar of undefined
Last Comment
Sharath S

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ryan Chong

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Nitin Sontakke

And just FYI, if you have SQL Server 2016, there is built-in function string_split.
SOLUTION
Sharath S

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck