I'd basically like to something like:
Name Friend_1 Friend_2 Friend_3
---- -------- -------- --------
A a_1 a_2 a_3
B b_1 b_2
To:
Name Friend
---- ------
A a_1
A a_2
A a_3
B b_1
B b_2
Some kind of cartesian product of the text in column Name
with the text in column Friend_1
, Friend_2
, Friend_3
.
I suspect I'll be using something like TRANSPOSE
and CONCAT
but I'm not sure.
Best Answer
It looks like this custom function works quite well: