Re: [opensuse-es] Re: pl/pgsql para torpes

From: jcb <jcb(at)greccosoft(dot)es>
To: pgsql-es-ayuda <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: [opensuse-es] Re: pl/pgsql para torpes
Date: 2008-05-30 16:41:33
Message-ID: 1212165693.4674.8.camel@hwcasa.a
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Perdon mi intención no era mandarlo 3 veces pero es que el mensaje nunca me
llegaba, los envie a las 11 y a las 2 todavía no las había recibido.

Aprovecho para preguntaros si hay una guia rapida de pl/pgsql es castellano, he
visto una y no consigo mucho

No entiendo bien como introducir las variables en las cadenas de los execute, yo
intento montar la cadena con el valor , pero creo que debe de ser de otra manera,
supongo que poniendo variables que en el momento de ejecución va ha sustituir, lo
hago de esta forma :

aux0 := 'select distinct
c.empresa,to_number(to_char(c.fecha,''YYYYMMDDHH24''),''9999999999''),to_number(to_char(c.fecha,''YYYY''),''9999''),

to_number(to_char(c.fecha,''Q''),''9'') to_number(to_char(c.fecha,''MM''),''99''),
to_number(to_char(c.fecha,''W''),''9''),
to_number(to_char(c.fecha,''WW''),''99''),
to_number(to_char(c.fecha,''ID''),''9''),
> > to_number(to_char(c.fecha,''DD''),''99'')
> > > from gc05albc c,gc06albl l
> >
> > > where c.empresa = ''' ||
> > dw01.empresa || '''
> > > and c.serie =
> > l.serie
> > > and c.albaran =
> > l.albaran
> > > and c.fecha >=''' ||
> > dw01.fecha_inicial
> > > || '''
> >
> > > and c.proveedor =
> > l.proveedor
> > > and l.tipo = 1
> >
> > > and l.unidades 0
> >
> > > and length(l.articulo) = 0';
> >
> > > end if;
> >
> > >
> >
> > > OPEN dw0_0010_1_c FOR EXECUTE aux0;
> >
> > >
> >
> > > RAISE NOTICE 'PASA';
> >
> > > LOOP
> >
> > > FETCH dw0_0010_1_c INTO dw10;
> >
> > > EXIT WHEN NOT FOUND;
> >
> > > RAISE NOTICE 'prueba', dw10.tiempo;
> >
> > > END LOOP;
> >
> > >
> >
> > > RAISE NOTICE 'PASA FIN';
> >
> > >
> >
> > > RETURN 0;
> >
> > > END;
> >
> > > $BODY$
> >
> > > LANGUAGE 'plpgsql' VOLATILE
> >
> > >
> >
> > >
> >
> > >
> >
> > >
> >
> > > __________ Information from ESET NOD32 Antivirus,
> > version of virus signature
> > > database 3146 (20080530) __________
> >
> > >
> >
> > > The message was checked by ESET NOD32 Antivirus.
> >
> > >
> >
> > > http://www.eset.com
> > >
> >
> > >
> >
> > > --
> >
> > > TIP 1: para suscribirte y desuscribirte, visita
> http://archives.postgresql.org/pgsql-es-ayuda
> > >
> >
> >
> >
> > Estimado :
> >
> > Con que envio el correo solo una vez basta, ha llegado tres veces,
> >
> > creo que si existe alguien de la lista que pueda respondder a tu duda
> >
> > lo hara lo mas rapido posible, saludos.
> >
> > J
> >
> > --
> >
> > ----------------------
> >
> > Slds.
> >
> > jchavez
> >
> > linux User #397972 on http://counter.li.org/
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> Para dar de baja la suscripción, mande un mensaje a:
> opensuse-es+unsubscribe(at)opensuse(dot)org
> Para obtener el resto de direcciones-comando, mande
> un mensaje a:
> opensuse-es+help(at)opensuse(dot)org
>
>

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Pablo E. Siciliano 2008-05-30 16:46:59 Re: Hacer una firma digital con sha-1
Previous Message Edwin Quijada 2008-05-30 16:38:39 Postgres y standard PCI