我有一個問題,我無法解決。我有這樣的說法:oracle listagg - 字符串連接的結果太長
SELECT account,
listagg(field1 || ', ') WITHIN
GROUP (
ORDER BY field1
) AS field1
FROM TABLE1
GROUP BY account
我得到一個錯誤:
ORA-01489: result of string concatenation is too long 01489. 00000 - "result of string concatenation is too long" *Cause: String concatenation result is more than the maximum size. *Action: Make sure that the result is less than the maximum size.
如何解決?我試圖做到這一點,但它並沒有幫助的SQL函數返回一個字符串必須符合的最高限額內,這是4000
SUBSTR(listagg(field1 || ', ') WITHIN
GROUP (
ORDER BY field1
), 1, 500) AS field1
如果連接時間過長,那麼明顯的解決方案是不是將其截斷? –