Hi Bill,
That did it!! I owe you a beer - Larry From: open-ils-general-boun...@list.georgialibraries.org [mailto:open-ils-general-boun...@list.georgialibraries.org] On Behalf Of Bill Erickson Sent: Monday, February 25, 2013 5:18 PM To: Evergreen Discussion Group Subject: Re: [OPEN-ILS-GENERAL] Syntax error when creating postgres function On Mon, Feb 25, 2013 at 4:04 PM, Larry W Arnold <arn...@wvlc.lib.wv.us> wrote: Will someone please provide assistance or guidance on the problem I am experiencing while attempting to create the postgres function for inserting records into the evergreen database? evergreen=# CREATE OR REPLACE FUNCTION staging_importer() RETURNS NULL AS $$ evergreen$# DECLARE stage RECORD; evergreen$# BEGIN evergreen$# FOR stage IN SELECT * FROM staging_records_import ORDER BY id LOOP evergreen$# INSERT INTO biblio.record_entry (marc, last_xact_id) VALUES (s tage.marc, 'IMPORT'); evergreen$# UPDATE staging_records_import SET dest = currval('biblio.recor d_entry_id_seq'); evergreen$# END LOOP; evergreen$# END; evergreen$# $$ LANGUAGE plpgsql; ERROR: syntax error at or near "AS" LINE 1: ...TE OR REPLACE FUNCTION staging_importer() RETURNS NULL AS $$ Hi Larry, Try 'RETURNS VOID' instead of 'RETURNS NULL'. -b -- Bill Erickson | Senior Software Developer | phone: 877-OPEN-ILS (673-6457) | email: ber...@esilibrary.com | web: http://esilibrary.com | Equinox Software, Inc. / Your Library's Guide to Open Source