Listagg function and ORA-01489: result of string concatenation is too long

前端 未结 3 1751
萌比男神i
萌比男神i 2020-12-17 18:56

When i run the following query:

 Select
  tm.product_id,
  listagg(tm.book_id || \'(\' || tm.score || \')\',\',\')
    within group (order by tm.product_id)          


        
3条回答
  •  生来不讨喜
    2020-12-17 19:31

    I have seen the alternative example described here - http://www.oracle-base.com/articles/misc/string-aggregation-techniques.php but they all require the use of functions or procedure.

    No they don't. Scroll down and you'll see several options that don't require pl/sql.

提交回复
热议问题