I have four tables: acting
, writing
, film
, tech
email | skill
-----------------------
[email protected] | acting
[email protected] | acting
[email protected] | acting
... | ...
email | skill
-----------------------
[email protected] | writing
[email protected] | writing
[email protected] | writing
... | ...
email | skill
-----------------------
[email protected] | film
[email protected] | film
[email protected] | film
... | ...
email | skill
-----------------------
[email protected] | tech
[email protected] | tech
[email protected] | tech
... | ...
I want to create a new table skills
, such that every email address is included, and the skills pertaining to each address are concatenated into the skill field.
email | skill
-----------------------
[email protected] | acting, writing
[email protected] | writing, film
[email protected] | acting, film, tech
... | ...
I've mucked around with full outer joins via union but I can't seem to get it right.
UPDATE: I realize how poorly these tables are designed. I am migrating data from a frankenstein legacy CRM with the above tables, and I need the values comma separated in the new table so I can import them into a new CRM.