From: | "Mario Soto" <msotocl(at)gmail(dot)com> |
---|---|
To: | Javier Bermúdez Tito <javier_bt(at)hotmail(dot)com> |
Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: funcion plpgsql |
Date: | 2007-01-09 20:12:05 |
Message-ID: | e9b17cde0701091212p24d7dad4q5e47706ed04bf8e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
aun asi no me funciona
El 9/01/07, Javier Bermúdez Tito<javier_bt(at)hotmail(dot)com> escribió:
> Me falto ponerle IN
>
> FOR rd_data IN SELECT s.idcsucur, s.saucnosu, s.saucdire FROM sucursales s
> WHERE s.eliminar = 0 ORDER BY s.saucnosu ASC LOOP
> ...
>
> pruebalo
>
> asi podras obtener todos los datos pruebalo y acondicionalo para tu consulta
> segun tus criterios.
>
> CREATE OR REPLACE FUNCTION "public"."get_rec" (VARCHAR, INTEGER, VARCHAR)
> RETURNS SETOF "public"."ty_rec" AS
> $body$
> DECLARE
> rd_data ty_rec%ROWTYPE;
> BEGIN
> FOR rd_data SELECT s.idcsucur, s.saucnosu, s.saucdire FROM sucursales s
> WHERE s.eliminar = 0 ORDER BY s.saucnosu ASC LOOP
> RETURN NEXT rd_data;
> END LOOP;
> END;
> $body$
> LANGUAGE 'plpgsql';
>
> _________________________________________________________________
> MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | GABRIEL COLINA | 2007-01-09 20:12:24 | Re: Supermercado posgreSQL o SQLServe |
Previous Message | Felipe Amezquita | 2007-01-09 19:57:32 | ctid escoger maximo |