Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Bases de datos > Firebird e Interbase
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 27-01-2005
noobdelphi noobdelphi is offline
Registrado
 
Registrado: ene 2005
Posts: 8
Poder: 0
noobdelphi Va por buen camino
Aclaro que new.md_hoin esta declarada en la tabla como time
Código SQL [-]
 CREATE TRIGGER MOVDIA_TG_MOV FOR MOVDIA
 INACTIVE AFTER INSERT OR UPDATE POSITION 10
 AS
 declare variable hst time;
 declare variable hn time;
 declare variable het time;
 declare variable hsm time;
 declare variable timeout time;
 declare variable timein time;
 declare variable fein date;
 begin
         if(new.md_feout>new.md_fein )then
         begin
              fein=new.md_fein;
              timein=new.md_hoin;(AKI ME GENERA EL ERROR)
              if(new.md_hoin > :hst)then
              begin
                     hn=0;
              end
              if(:het<=:timein and :timein<=:hst)then
              begin
                     hn=:hst-:timein;
              end
              if(:hsm<:timein and :timein<:het)then
              begin
                     hn=:hst-:het;
              end
 
              if(:timein<=:hsm)then
              begin
                     hn=(:hst-:het)+(:hst-:timein);
              end
 
         end
 end

puse todo el ejemplo porque me ademas quisiera saber si las operaciones con horas se pueden hacer de manera directa como lo intento hacer.
todos los datos los saco de valores de otras tablas por medio de un select.
muchas gracias por la ayuda que me puedan prestar
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 15:58:43.


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