Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 7A552476B83 for ; Mon, 24 Jun 2002 15:27:55 -0400 (EDT) Mailbox-Line: From jeff_eckermann@yahoo.com Mon Jun 24 15:27:55 2002 Received: from web20805.mail.yahoo.com (web20805.mail.yahoo.com [216.136.226.194]) by postgresql.org (Postfix) with SMTP id E8245476790 for ; Mon, 24 Jun 2002 14:06:17 -0400 (EDT) Message-ID: <20020624180618.97711.qmail@web20805.mail.yahoo.com> Received: from [208.13.35.95] by web20805.mail.yahoo.com via HTTP; Mon, 24 Jun 2002 11:06:18 PDT Date: Mon, 24 Jun 2002 11:06:18 -0700 (PDT) From: Jeff Eckermann Subject: Re: assign count() result to a declared variable in plpgsql To: Joseph Syjuco , postgres In-Reply-To: <1024932336.15861.8.camel@Askr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Status: No, hits=-5.3 required=5.0 tests=IN_REP_TO,X_NOT_PRESENT version=2.30 X-Spam-Level: X-Archive-Number: 200206/326 X-Sequence-Number: 8291 try: f_count_var := count(empno) from employee; --- Joseph Syjuco 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