From: John DeSoi <desoi@pgedit.com>
To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: ERROR: SELECT query has no destination for result data
Date: Thu, 31 Aug 2006 09:57:44 -0400
Message-ID: <F3D2085F-FDA7-4264-897A-385F7219DB21@pgedit.com> (raw)
In-Reply-To: <55c095e90608310600y18d382f2l5cc43410466bbd79@mail.gmail.com>
References: <55c095e90608310600y18d382f2l5cc43410466bbd79@mail.gmail.com>
On Aug 31, 2006, at 9:00 AM, Ezequias Rodrigues da Rocha wrote:
> select count(id) as numRegistros from base.emissor_ponto_venda
> where id = PontoVenda_Emissor;
declare numRegistros as an integer in the declarations section and
rewrite the select:
select into numRegistros count(id) from base.emissor_ponto_venda
where id = PontoVenda_Emissor;
See http://www.postgresql.org/docs/8.1/interactive/plpgsql-
statements.html#PLPGSQL-SELECT-INTO
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL
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: desoi@pgedit.com, ezequias.rocha@gmail.com
Subject: Re: ERROR: SELECT query has no destination for result data
In-Reply-To: <F3D2085F-FDA7-4264-897A-385F7219DB21@pgedit.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