我有一张这样的桌子:
+----+-------+-----------------+
| ID | Name | Email |
+----+-------+-----------------+
| 1 | Jane | Jane@doe.com |
| 2 | Will | Will@gmail.com |
| 3 | Will | wsj@example.com |
| 4 | Jerry | jj2@test.com |
+----+-------+-----------------+
不幸的是,由于有多封电子邮件,我的记录重复。我想运行一个SQL查询来生成这个:
+----+-------+---------------------------------+
| ID | Name | Email |
+----+-------+---------------------------------+
| 1 | Jane | Jane@doe.com |
| 2 | Will | Will@gmail.com, wsj@example.com |
| 4 | Jerry | jj2@test.com |
+----+-------+---------------------------------+
我知道用数字您会做类似的事情,但是我不知道如何对文本字段进行求和:
SELECT *,
SUM(Number_Field) AS Number_Field,
FROM table
谢谢!
编辑:我正在使用MS Access