Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Firebird e Interbase (https://www.clubdelphi.com/foros/forumdisplay.php?f=19)
-   -   Error a la hora de generar un trigger (https://www.clubdelphi.com/foros/showthread.php?t=25381)

jmlifi 21-09-2005 11:09:40

Error a la hora de generar un trigger
 
Trabajo con interbase 5, realizo la siguiente instruccion:

CREATE TRIGGER ACTPEDIDO1 FOR PZALB ACTIVE
AFTER INSERT POSITION 0
as
declare variable n int;
declare variable nPedido int;
begin
select Pedido
from Albaran
where N_Alb=new.N_Alb
into :nPedido;
select Realzdas from pzpedido
where (PzPedido.O_Ped = new.O_Ped) AND
(PzPedido.Pedido = :nPedido)
into :n;
if (n is null) then
n = 0;
if (not new.QA is null) then
n = n + new.QA;
update PzPedido set Realzdas = :n
where (PzPedido.O_Ped = new.O_Ped) AND
(PzPedido.Pedido = :nPedido);
end


Meda el error : XSQLDA index out of range.

¿Como lo soluciono?


La franja horaria es GMT +2. Ahora son las 08:39:47.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi