Ver Mensaje Individual
  #1  
Antiguo 05-08-2008
jmlifi jmlifi is offline
Miembro
 
Registrado: abr 2005
Posts: 188
Reputación: 20
jmlifi Va por buen camino
Firebird : triggers

Hola a todos!!!

Tengo el siguiente trigger:
Código Delphi [-]
CREATE TRIGGER ACTSUB FOR LNSUBCONT ACTIVE
AFTER INSERT POSITION 0
as
declare Variable EsCorte Char;
declare variable EsTrabajo Integer;
begin
   select Corte,Ordentrabajo from SubContratos where codigo = New.Codigo
   into :EsCorte,:EsTrabajo;
   if (((EsCorte='S') or (EsCorte='C')) and (EsTrabajo is null))  then
      update PzasPdtes set PdtesP = PdtesP - new.Cant,
      SubCont= new.Codigo  
      where  (PzasPdtes.O_Ped  = new.O_Ped) and
             (PzasPdtes.Pedido = new.Pedido);
   else
      update Ubicacionpzas set TratmtoAct= new.Tratmto, subcon=new.codigo
      where  (Ubicacionpzas.O_Ped  = new.O_Ped) and
             (Ubicacionpzas.Pedido = new.Pedido);
end

Quiero introducir un mensaje para saber que parte del código me ejecuta. En oracle se que se utiliza DBMNS...

¿hay posibilidad de hacerlo?

saludos
Responder Con Cita