From: | Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com> |
---|---|
To: | Joseph Syjuco <joseph(at)asti(dot)dost(dot)gov(dot)ph>, postgres <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: assign count() result to a declared variable in plpgsql |
Date: | 2002-06-24 18:06:18 |
Message-ID: | 20020624180618.97711.qmail@web20805.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
try:
f_count_var := count(empno) from employee;
--- Joseph Syjuco <joseph(at)asti(dot)dost(dot)gov(dot)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(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2002-06-24 18:36:56 | Re: Slow SELECT with distinct, in a TIMESTAMP type column |
Previous Message | Bruce Momjian | 2002-06-24 16:16:36 | Re: variance aggregate function incorrect? Reference Materials |