I am experiencing one further error on this procedure. I've been researching, but haven't found anything specific as a solution. Most descriptions of the problem are too broad. Below is the sql:
DECLARE IMC CURSOR FOR
SELECT t1.ALIAS, t1.T_30, t1.T_14, t1.T_3, t2.ukey, t2.ALIAS, t2.T_30...