From: Jeff Eckermann <jeff_eckermann@yahoo.com>
To: Joseph Syjuco <joseph@asti.dost.gov.ph>
To: postgres <pgsql-sql@postgresql.org>
Subject: Re: assign count() result to a declared variable in plpgsql
Date: Mon, 24 Jun 2002 11:06:18 -0700 (PDT)
Message-ID: <20020624180618.97711.qmail@web20805.mail.yahoo.com> (raw)
In-Reply-To: <1024932336.15861.8.camel@Askr>
try:
f_count_var := count(empno) from employee;
--- Joseph Syjuco <joseph@asti.dost.gov.ph> wrote:
>
> i want to put my count() result in a plpgsql
> declared integer variable
>
>
> declare f_count_var integer;
> begin
> select into f_count_var count(empno) from employee
> end;
>
> tried this one but it doesnt work
>
>
>
>
>
>
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please
> send an appropriate
> subscribe-nomail command to majordomo@postgresql.org
> so that your
> message can get through to the mailing list cleanly
>
>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jeff_eckermann@yahoo.com, joseph@asti.dost.gov.ph
Subject: Re: assign count() result to a declared variable in plpgsql
In-Reply-To: <20020624180618.97711.qmail@web20805.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox