You can't use ARRAY in an UDF on DB2 9.5 for LUW,
according to the manual "DB2 Version 9.5 for Linux, UNIX, and Windows SQL Reference, Volume 2 Updated March, 2008 SC23-5862-01".
ARRAY in an UDF is supported on DB2 9.7 for LUW, with some restrictions.
Quote:
CREATE FUNCTION (SQL scalar, table, or row)
.....
.....
.....
Notes:
.....
4
The compound SQL (compiled) statement is supported only for an
SQL-function-body in an SQL scalar function definition in a non-partitioned
database. It is not supported for SQL table function definitions or in
partitioned database environments.
|