单行结果的重复记录的连接字段

时间:2015-03-18 18:43:56

标签: sql duplicates concatenation concat

我想知道如何在我的查询中连接一个字段以返回给我一个不同的最终结果,我在查询中返回的行。

这就是我得到的:

SELECT
     O.OBJECT_ID AS "ID"
    ,A.NAME AS "Full Name"
    ,RECORD.Name AS "Record Type"

FROM 
    OBJECT AS O
    INNER JOIN ACCOUNT AS A ON O.ACCOUNTID = A.ID
    INNER JOIN RECORD ON RECORD.ID = A.RECORDID

目前返回以下内容:

ID        FULL NAME     RECORD TYPE
123       John Doe      Website Record
456       John Doe      Website Record
789       John Doe      Website Record

这就是我想要的样子:

ID               FULL NAME     RECORD TYPE
123, 456, 789    John Doe      Website Record

由于

0 个答案:

没有答案