【发布时间】:2022-10-05 23:34:26
【问题描述】:
我正在尝试使用 LISTAGG 合并 sql 中的行,但是得到的错误消息不是按函数分组
select
tbc.idattribute,
tbc.idclient,
tbc.idclientattribute,
tbc.idattributetype,
tbl.vcdescription,
LISTAGG(tb.vclongdescription, \'; \') WITHIN GROUP(ORDER BY tbc.idclient) \" test_consent\",
person_id
from
tbclientattribute tbc, tblookupheader tbl, tbclient, tblookupdetail tb
where tbc.idattributetype = tbl.idlookupheader (+)
and tbclient.idclient = tbc.idclient (+)
and tbc.idattribute = tb.idlookupdetail(+)
group by person_id
order by person_id
-
请标记您正在使用的数据库。