我有四张桌子:acting
, writing
, film
,tech
email | skill
-----------------------
foo@bar.com | acting
foo1@bar.com | acting
foo2@bar.com | acting
... | ...
email | skill
-----------------------
foo@bar.com | writing
foo7@bar.com | writing
foo8@bar.com | writing
... | ...
email | skill
-----------------------
foo4@bar.com | film
foo9@bar.com | film
foo12@bar.com | film
... | ...
email | skill
-----------------------
foo3@bar.com | tech
foo4@bar.com | tech
foo7@bar.com | tech
... | ...
我想创建一个新表skills
,以便包含每个电子邮件地址,并且将与每个地址相关的技能连接到技能字段中。
email | skill
-----------------------
foo@bar.com | acting, writing
foo1@bar.com | writing, film
foo2@bar.com | acting, film, tech
... | ...
我已经通过联合进行了完整的外部连接,但我似乎无法正确处理。
更新:我意识到这些表的设计有多糟糕。我正在使用上述表格从 frankenstein 旧 CRM 迁移数据,我需要在新表中用逗号分隔值,以便将它们导入新的 CRM。