We created this DB Procedure and is running in Ingres 10.2,\nUnfortunately, during our test upgrade in Ingres 11.1, we are hanging on the execute of this.\n\ncreate procedure dbp_virtual_sel_pf_ledger\n( p_pagibigid varchar(25) not null,\n  p_account_no varchar(25) not null,\n  p_program_code varchar(10) not null,\n  p_cyear varchar(13) not null )\nresult row( varchar(25),\n           ingresdate,\n           varchar(6),\n           varchar(13),\n           money,\n           money,\n           money,\n           varchar(25),\n           varchar(250)) as\ndeclare\n  v_trans_code varchar(10);\n  v_refno varchar(25);\n  v_trans_date ingresdate;\n  v_percov varchar(6);\n  v_cyear varchar(13);\n  v_ee money;\n  v_er money;\n  v_div money;\n  v_pagibig_erid varchar(25);\n  v_eyername varchar(250);\nbegin\n  for select trans_code,\n             refno,\n             trans_date,\n             percov,\n             cyear,\n             sum(ee),\n             sum(er),\n             sum(div),\n             pagibig_erid,\n             eyername\n       into :v_trans_code,\n            :v_refno,\n            :v_trans_date,\n            :v_percov,\n            :v_cyear,\n            :v_ee,\n            :v_er,\n            :v_div,\n            :v_pagibig_erid,\n            :v_eyername\n     from vw_virtual_branch_pf_ledger\n     where pagibigid = :p_pagibigid and\n           account_no = :p_account_no and\n           program_code = :p_program_code and\n           cyear = :p_cyear\n     group by trans_code,\n              refno,\n              trans_date,\n              percov,\n              cyear,\n              pagibig_erid,\n              eyername having sum(ee) <> 0 or\n                              sum(er) <> 0 or\n                              sum(div) <> 0\n     order by trans_date desc,\n              percov desc\n     do return row(:v_refno,\n                    :v_trans_date,\n                    :v_percov,\n                    :v_cyear,\n                    :v_ee,\n                    :v_er, :v_div,\n                    :v_pagibig_erid,\n