Hi Thanks for the help, but I am kind of stuck on the cursors in PL/pgSQL I have tried > adempiere.CUR_Attributes CURSOR ai.Value, a.Name FOR > SELECT ai.Value, a.Name and > DECLARE adempiere.CUR_Attributes CURSOR FOR > SELECT ai.Value, a.Name but none are accepted.