Re: ayuda mostrando resultados de una funcion

From: "Jaime Casanova" <systemguards(at)gmail(dot)com>
To: "mario vargas careaga" <mario(dot)vargas(dot)careaga(at)gmail(dot)com>
Cc: "ayuda postgres" <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: ayuda mostrando resultados de una funcion
Date: 2007-05-16 06:12:45
Message-ID: c2d9e70e0705152312t3d03af7el4f514bf6529c1b6b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

por favor, siempre envia a la lista... esta vez recibes respuesta
despues de 15 horas porque yo no tengo acceso a mi correo todo el
dia...

On 5/15/07, mario vargas careaga <mario(dot)vargas(dot)careaga(at)gmail(dot)com> wrote:
> hice lo que dicen los errores y lo que mencionaste me creo
> correctamente la funcion...
[...]
> ERROR: query has no destination for result data
> Estado SQL:42601
> Sugerencias:If you want to discard the results of a SELECT, use PERFORM instead.
> Contexto:PL/pgSQL function "ver_tasa" line 6 at SQL statement
> no entiendo porque?
>

que bien! ya lees los errores, ahora demos un paso mas... ahora te
toca leer las "sugerencias" =)

ahora de castigo te toca leer la documentacion =)
http://www.postgresql.org/docs/8.2/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-SQL-NORESULT

PS:
> select PORC = PORCENT INTO resultado from vwtasas where vwtasas.num_pre = NPRE;

esto no lo puedes hacer en postgres, esto es un m$sqlismo; es decir,
el usar el igual para asignar el valor a una variable

http://www.postgresql.org/docs/8.2/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-SQL-ONEROW

--
Atentamente,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
Richard Cook

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Fabian Pineda 2007-05-16 10:51:32 campo de texto para 250 palabras
Previous Message Jaime Casanova 2007-05-16 05:56:44 Re: Consulta sobre el correcto uso de campos null