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

From Joe
Subject Re: ERROR: SELECT query has no destination for result data
Date
Msg-id 44F6F05D.5040300@freedomcircle.net
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
Ezequias Rodrigues da Rocha wrote:
> Hi list,
>
> I have a function like this:
>
> Create OR REPLACE Function base.inserirPontos(char(1), varchar(255), 
> numeric(12,2), int8, int8, int8 ) returns int4 as
> $$
> declare
>     Operacao alias for $1;
>     Numero_nota alias for $2;
>     Valor_nota alias for $3;
>     PontoVenda_Emissor alias for $4;
>     Cardpass alias for $5;
>     Cx_Id alias for $6;
>
> begin
>
> -- Validando parâmetros passados na função
>
>   if Operacao <> 'C' then
>      return 1;
>    else
>      select count(id) as numRegistros from base.emissor_ponto_venda 
> where id = PontoVenda_Emissor;
You haven't declared numRegistros.

Joe


pgsql-sql by date:

Previous
From: "Aaron Bono"
Date:
Subject: Re: Trigger on Insert to Update only newly inserted fields?
Next
From: "Aaron Bono"
Date:
Subject: Re: Trigger with Stored Procedure [Client Points]