I have tried "IF NOT FOUND THEN" but not getting the desired result
Thanks, Sunday Olutayo Sadeeb Technologies Ltd 7 Mayegun Street, Ojo Lagos State, Nigeria. Tel: +234 1 7404524 D/L: +234 1 8169922 Cell: +234 8054600338, 234 8096441688 Fax: +234 8054895664 mail: olut...@sadeeb.com ----- Original Message ----- From: "Chris Ernst" <cer...@zvelo.com> To: pgsql-general@postgresql.org Sent: Wednesday, September 26, 2012 7:10:03 PM Subject: Re: [GENERAL] trigger and plpgsq help needed On 09/26/2012 10:42 AM, SUNDAY A. OLUTAYO wrote: > This IF last_id IS NULL THEN suppose to test if last_id is NULL, that is > the select query did not found it > then execute the rest of the red sql but it always fail to insert the > *NEW.amount *into*amount*, every other things fine. I believe what you're looking for is "IF NOT FOUND THEN" instead of "IF last_id IS NULL THEN" Cheers! - Chris -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general