Re: [GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1

2012-02-28 Thread Lummis, Patrick J
tored Procedure Record Updates using For Loops - Postgres 8.1 On Tuesday, February 28, 2012 12:35:58 pm Lummis, Patrick J wrote: > Hi Bartek, > > Thanks for the quick response. > > Syntax error cleared up and loads fine but executing the stored > procedure fails to update the

Re: [GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1

2012-02-28 Thread Adrian Klaver
On Tuesday, February 28, 2012 12:35:58 pm Lummis, Patrick J wrote: > Hi Bartek, > > Thanks for the quick response. > > Syntax error cleared up and loads fine but executing the stored > procedure fails to update the row. >From the usage I guessing this function is not being used in a trigger. As

Re: [GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1

2012-02-28 Thread Bartosz Dmytrak
> Dmytrak > *Sent:* Tuesday, February 28, 2012 12:24 PM > *To:* Lummis, Patrick J > *Cc:* pgsql-general@postgresql.org > *Subject:* Re: [GENERAL] Stored Procedure Record Updates using For Loops > - Postgres 8.1 > > Hi, > instead of > *update workorderRecord set wfs

Re: [GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1

2012-02-28 Thread Lummis, Patrick J
, February 28, 2012 12:24 PM To: Lummis, Patrick J Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1 Hi, instead of update workorderRecord set wfstatus='failed'; try: workorderRecord.wfstatus := 'failed';

Re: [GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1

2012-02-28 Thread Bartosz Dmytrak
Hi, instead of *update workorderRecord set wfstatus='failed'; * try: workorderRecord.wfstatus := 'failed'; I haven't tested, but workorderRecord is ROWTYPE, so shouldn't be updated like a table. I'm sticked to 9.1, hope the same is for 8.1 http://www.postgresql.org/docs/9.1/static/plpgsql-declara

[GENERAL] Stored Procedure Record Updates using For Loops - Postgres 8.1

2012-02-28 Thread Lummis, Patrick J
Hi, I'm trying to update a record within a for loop and at the point of updating I get the following syntax error: ERROR: syntax error at or near "$1" LINE 1: update $1 set wfstatus='failed' ^ QUERY: update $1 set wfstatus='failed' CONTEXT: SQL statement in PL/PgSQL functi