Avatar of jollysreek
 asked on

SQL Split Data

I have 3 columns in a table as had data as listed below.

id    col1             col2
1    abc,def        ab,df,gt,ty,yj
2.  as,er,tr,ig      we,re,t,vg,th

If i want to split the data  on both the columns what should i do????

i want the result in the following way,

1    abc     ab
1   def      df
1   Null      gt
1   null      ty and so on.....

Microsoft SQL Server 2008

Avatar of undefined
Last Comment
Guy Hengel [angelIII / a3]

8/22/2022 - Mon
Guy Hengel [angelIII / a3]

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

can you use a query instead of function for this.... ?
Guy Hengel [angelIII / a3]

no, not really.
Your help has saved me hundreds of hours of internet surfing.