Re: [GENERAL] Syntax error for Function

2016-01-20 Thread Adrian Klaver
On 01/20/2016 08:00 AM, Sachin Srivastava wrote: Dear Adiran, Thanks for your help !! First I want to say it's not giving the error for this ""languaget...@repos.birchstreet.net ", so there is any need to do the change as suggested by you. You are no

Re: [GENERAL] Syntax error for Function

2016-01-20 Thread Sachin Srivastava
Dear Adiran, Thanks for your help !! First I want to say it's not giving the error for this "" languaget...@repos.birchstreet.net", so there is any need to do the change as suggested by you. Second you suggested " exit with cur1; " - *You are right after putting the semi column my code is workin

Re: [GENERAL] Syntax error for Function

2016-01-20 Thread Adrian Klaver
On 01/20/2016 06:32 AM, Sachin Srivastava wrote: Dear Thom, Please find the complete code as below and suggest now. I would suggest spending some time here: http://www.postgresql.org/docs/9.4/interactive/plpgsql.html in particular: http://www.postgresql.org/docs/9.4/interactive/plpgsql-cont

Re: [GENERAL] Syntax error for Function

2016-01-20 Thread Sachin Srivastava
Dear Thom, Please find the complete code as below and suggest now. -- -- Function: gen_budget_for_next_year(bigint, bigint, bigint) -- DROP FUNCTION gen_budget_for_next_year(bigint, bigint, bigint); CREATE OR REPLACE FUNCTION gen_budget_for_next_year( subid bigint, co

Re: [GENERAL] Syntax error for Function

2016-01-20 Thread Thom Brown
On 20 January 2016 at 12:15, Sachin Srivastava wrote: > I am unable to find out the syntax error in below code, please suggest? > > > > ERROR: syntax error at or near "select" > LINE 44: select Count(0) into sFound from budget_period ... > ^ > ** Error **

[GENERAL] Syntax error for Function

2016-01-20 Thread Sachin Srivastava
I am unable to find out the syntax error in below code, please suggest? ERROR: syntax error at or near "select" LINE 44: select Count(0) into sFound from budget_period ... ^ ** Error ** ERROR: syntax error at or near "select" SQL state: 42601 Ch