Re: trigger and plpgsq help needed - Mailing list pgsql-general

From SUNDAY A. OLUTAYO
Subject Re: trigger and plpgsq help needed
Date
Msg-id 51907e19-d504-4db3-993c-46c470999e1d@mail
Whole thread Raw
In response to Re: trigger and plpgsq help needed  (Chris Ernst <cernst@zvelo.com>)
List pgsql-general
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: olutayo@sadeeb.com




----- Original Message -----
From: "Chris Ernst" <cernst@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


pgsql-general by date:

Previous
From: "SUNDAY A. OLUTAYO"
Date:
Subject: Re: trigger and plpgsq help needed
Next
From: Leonardo M. Ramé
Date:
Subject: Re: Linux PowerPC 64bits issue