From: | "Edwin Quijada" <listas_quijada(at)hotmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | I dont know the error with updtae |
Date: | 2003-09-18 20:06:22 |
Message-ID: | BAY1-F12ewQ1N8Pik3Y0000075e@hotmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi!
I have a trigger using a update but this doestn work into trigger but if I
execute the update from pgadmin this works perfectely.
This is the code
select into registro * from t_pagos_comisiones where f_wholetipoagnivel =
who and f_fecha = $4 for update;
IF FOUND THEN
IF ($5 >0) THEN
t1:= registro.f_montopagado+$7;
t2:= registro.f_montocomision+$5;
raise notice '' hacer el update t1 y t2 %, %'',t1,t2;
--f_montocomision=t2
UPDATE t_pagos_comisiones SET
f_montopagado=t1,f_montocomision=t2,f_nivel=90 where f_wholetipoagnivel
= who and f_fecha = vfecha;
end if;
end if;
*-------------------------------------------------------*
*-Edwin Quijada
*-Developer DataBase
*-JQ Microsistemas
*-809-747-2787
* " Si deseas lograr cosas excepcionales debes de hacer cosas fuera de lo
comun"
*-------------------------------------------------------*
_________________________________________________________________
¿Estás buscando un auto nuevo? http://www.yupimsn.com/autos/
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2003-09-18 20:22:48 | PostgreSQL versus MySQL |
Previous Message | Tom Lane | 2003-09-18 19:19:16 | Re: State of Beta 2 |