From: | "SUNDAY A(dot) OLUTAYO" <olutayo(at)sadeeb(dot)com> |
---|---|
To: | Chris Ernst <cernst(at)zvelo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: trigger and plpgsq help needed |
Date: | 2012-09-27 13:13:20 |
Message-ID: | 51907e19-d504-4db3-993c-46c470999e1d@mail |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)sadeeb(dot)com
----- Original Message -----
From: "Chris Ernst" <cernst(at)zvelo(dot)com>
To: pgsql-general(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2012-09-27 13:32:45 | Re: problem with recreating database with export |
Previous Message | SUNDAY A. OLUTAYO | 2012-09-27 13:04:46 | Re: trigger and plpgsq help needed |