Split the values in my sql table to individual records which have the same values for all the other columns except the column which will be split into

Viewed 25

I have a table as given below:

enter image description here

I want to split the records in such a way that the multiple Apps for a single ID are displayed separately keeping the rest of the field information same. Like below.

enter image description here

I have tried a few ways but was unable to achieve the desired results, like below I used the following query

   select t1.ID, t1.Apps
from ImpactedProjects t1
outer apply dbo.DelimitedSplit8K(t1.Apps,';') where ID=13

but it gave the following output.

enter image description here

Any help is appreciated.

0 Answers
Related