LISTAGG失败,sqlcode = -433

时间:2018-12-26 09:09:14

标签: db2 maxlength listagg

如何从长远来看克服ListAGG函数的问题。

enter image description here

1 个答案:

答案 0 :(得分:1)

请尝试使用XMLAGG函数:

select 
--length (
substr(xmlserialize(
xmlquery('$L/text()' passing XMLAGG(xmlelement(name "a", ','||colname)) as "L") as clob(2M)
), 2)
--)
from syscat.columns;