Pass Array as parameter in DB2 Stored Procedure <p>I am trying to create a stored procedure which takes an array as a parameter and in the WHILE loop iterates through this array and adds the chars into a table.</p> <p>For example if I had an array of ['a','b','c'] I would want to pass this into my stored procedure and the characters 'a' , 'b' and 'c' to be placed into a table.</p> <p>My SP creates successfully, but I am having issues when I try to call my procedure. Can anybody point me towards how to pass in an array? My procedure is as follows....</p> <pre><code> DROP PROCEDURE DB.LWRH_DYNAMIC_SP@ create type stringArray as VARCHAR(100) array[100]@ CREATE PROCEDURE DB.LWRH_SP ( IN list stringArray ) LANGUAGE SQL BEGIN DECLARE i, MAX INTEGER; DECLARE c CHAR(1); SET i = 0; SET MAX = CARDINALITY(list); WHILE i &lt;= MAX DO SET c = list[i]; INSERT INTO schema.test ("SERVICE TYPE")values (c); END WHILE; END@ CALL DB.LWRH_SP('')@ </code></pre>