Re: ERROR: SELECT query has no destination for result data - Mailing list pgsql-sql

From John DeSoi
Subject Re: ERROR: SELECT query has no destination for result data
Date
Msg-id F3D2085F-FDA7-4264-897A-385F7219DB21@pgedit.com
Whole thread Raw
In response to ERROR: SELECT query has no destination for result data  ("Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: "Ezequias Rodrigues da Rocha"
Date:
Subject: ERROR: SELECT query has no destination for result data
Next
From: "Ezequias Rodrigues da Rocha"
Date:
Subject: Checking types