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