I read from messages like http://www.postgresql.org/mhonarc/pgsql-sql/1999-11/msg00076.html that CURSORS could not be used with pg/plsql, and indeed attempting to do so result in the same kind of error highlighted in that message. Are there any other ways I could with pgplsql simuate the use of Cursors and write functions that could fetch and process records row by row retrieved from a SELECT statement (and then put the processed data back to another table)? ---------------------------------------------------------------- Get your free email from AltaVista at http://altavista.iname.com