Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Expanding a One to Many Delimited Column Relation

Hi,

 

I currently have columns like this:

Column 1AColumn 2A
ID 1abc
ID 2abc,xyz
ID 3efg,xyz
ID 4abc,efg,xyz

 

And I would like to end up with this:

Column 1BColumn 2B
ID 1abc
ID 2abc
ID 2xyz
ID 3efg
ID 3xyz
ID 4abc
ID 4efg
ID 4xyz

 

Basically: give each delimited item it's own row and keep the relation to the ID number. I've tried unpivot and a few other things, but can't get it to work right.

 

Any help would be appreciated, thanks!