最佳答案
我正在使用 Oracle SQL 开发版本3.0.04。我尝试使用函数 LISTAGG
将数据组合在一起。
CREATE TABLE FINAL_LOG AS
SELECT SESSION_DT, C_IP, CS_USER_AGENT,
listagg(WEB_LINK, ' ')
WITHIN GROUP(ORDER BY C_IP, CS_USER_AGENT) "WEB_LINKS"
FROM webviews
GROUP BY C_IP, CS_USER_AGENT, SESSION_DT
ORDER BY SESSION_DT
然而,我一直得到错误,
SQL Error: ORA-01489: result of string concatenation is too long
我非常确定输出可能超过4000,因为这里提到的 WEB _ LINK 是 url 词干和 url 查询的连接值。
有什么办法可以绕过去吗,还有其他选择吗?