Start of change

Change in LISTAGG error

This changed behavior affects the LISTAGG() SQL aggregate function when no ON OVERFLOW clause is specified or when ON OVERFLOW ERROR is specified.

Previously, when the aggregated result string exceeded the result length, an SQL warning (SQLCODE +802, SQLSTATE '01004') would be produced. The LISTAGG result would be in error, and the query would run to completion.

On IBM i 7.4 with PTF MF69760 installed and IBM i 7.3 with PTF MF69761 installed, an aggregated string that exceeds the result length will cause the query to fail with an SQL error:
 (SQLCODE -802, SQLSTATE '22001'), referencing error type 12: Result of a concatenation operation on a varying-length field exceeded the maximum allowed length of the result type.
End of change