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


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to