Re: unable to assign value to variable in plpgsql - Mailing list pgsql-novice

From Chirag Mittal
Subject Re: unable to assign value to variable in plpgsql
Date
Msg-id 1392569485780-5792298.post@n5.nabble.com
Whole thread Raw
In response to Re: unable to assign value to variable in plpgsql  (David Johnston <polobo@yahoo.com>)
List pgsql-novice
Thanks everyone for your help, I did the following and it worked


maz := (SELECT count(*) FROM table WHERE col1 = var1);
EXECUTE 'SELECT count(*) FROM table WHERE col1 = $1'
USING col1 INTO maz;

"in" was a typo and var type along with query was under declare (hope this
is right practice techincaly)





--
View this message in context:
http://postgresql.1045698.n5.nabble.com/unable-to-assign-value-to-variable-in-plpgsql-tp5792281p5792298.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.


pgsql-novice by date:

Previous
From: David Johnston
Date:
Subject: Re: unable to assign value to variable in plpgsql
Next
From: Andrew Puschak
Date:
Subject: Re: Access 2003 reports queries taking very long