Re: ERROR: SELECT query has no destination for result data

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Ezequias Rodrigues da Rocha <ezequias(dot)rocha(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: ERROR: SELECT query has no destination for result data
Date: 2006-08-31 13:57:44
Message-ID: F3D2085F-FDA7-4264-897A-385F7219DB21@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Ezequias Rodrigues da Rocha 2006-08-31 13:58:52 Checking types
Previous Message 2000 Informatica 2006-08-31 13:51:43 Re: ERROR: SELECT query has no destination for result data