Re: [GENERAL] trigger and plpgsq help needed

2012-09-27 Thread SUNDAY A. OLUTAYO
, 2012 2:04:46 PM Subject: Re: [GENERAL] trigger and plpgsq help needed RobR, I have tried it 'IF FOUND' but not getting the desired result Thanks, Sunday Olutayo - Original Message - From: "Rob Richardson" To: pgsql-general@postgresql.org Sent: Wednesday, Se

Re: [GENERAL] trigger and plpgsq help needed

2012-09-27 Thread SUNDAY A. OLUTAYO
sadeeb.com - Original Message - From: "Chris Ernst" 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 suppos

Re: [GENERAL] trigger and plpgsq help needed

2012-09-27 Thread SUNDAY A. OLUTAYO
RobR, I have tried it 'IF FOUND' but not getting the desired result Thanks, Sunday Olutayo - Original Message - From: "Rob Richardson" To: pgsql-general@postgresql.org Sent: Wednesday, September 26, 2012 7:14:46 PM Subject: Re: [GENERAL] trigger an

Re: [GENERAL] trigger and plpgsq help needed

2012-09-26 Thread Adrian Klaver
On 09/26/2012 09:42 AM, SUNDAY A. OLUTAYO wrote: Dear all, I have issue with the red portion function below; 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.amou

Re: [GENERAL] trigger and plpgsq help needed

2012-09-26 Thread Chris Ernst
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 wh

Re: [GENERAL] trigger and plpgsq help needed

2012-09-26 Thread Rob Richardson
Why not use IF FOUND? RobR From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of SUNDAY A. OLUTAYO Sent: Wednesday, September 26, 2012 12:43 PM To: pgsql-general@postgresql.org Subject: [GENERAL] trigger and plpgsq help needed Dear all, I have issue