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
  #4  
Antiguo 01-06-2004
Avatar de jzginez
jzginez jzginez is offline
Miembro
 
Registrado: sep 2003
Ubicación: Puebla, México
Posts: 247
Poder: 23
jzginez Va por buen camino
Hola a todos esperando que la falta de respuesta sea porque no escribi el codigo dentro de las etiquetas correspondientes reescribo el codigo
Código SQL [-]
CREATE TRIGGER TOPERESTILO_AI FOR TOPERESTILO
ACTIVE AFTER INSERT POSITION 0
AS
declare variable tiempoOper time;
declare variable TiempoEstilo time;
declare variable tiempoTotal Integer;
begin
/* Trigger text */
if (new.id_oper is not null)
  Then begin
    select minutaje from toperaciones where id = new.id_oper into :TiempoOper;
    select minutaje from testilo where id = new.id_estilo into TiempoEstilo;
    tiempoTotal = extract(hour from TiempoEstilo)*3600 + extract(minute from TiempoEstilo)*60 + extract(second from TiempoEstilo);
    tiempototal = TiempoTotal + extract(hour from TiempoOper)*3600 + extract(minute from TiempoOper)*60 + extract(second from TiempoOper);  
    update testilo set minutaje = :tiempoTotal where id = new.id_estilo;
   end
end

lo último que he intentado es

Código SQL [-]
CREATE TRIGGER TOPERESTILO_AI FOR TOPERESTILO
ACTIVE AFTER INSERT POSITION 0
AS
declare variable preciotemp float;
declare variable tiempo1 time;
declare variable tiempo2 time;
begin
  /* Trigger text */
  if (new.id_oper is not null)
   Then begin
  select pagooper, minutaje from toperaciones where id = new.id_oper into reciotemp, :tiempo1;
  update testilo set precio = precio + reciotemp where id = new.id_estilo;
  select minutaje from testilo where id = new.id_estilo into :tiempo2;
  if (tiempo2 is null)
   then update testilo set minutaje = :tiempo1 where id = new.id_estilo;
  else update testilo set minutaje = minutaje + :tiempo1 where id = new.id_estilo;
  end
end


pero me indica el siguiente error que segun yo es en el if
Código PHP:
Unsuccessful execution caused by a system error that precludes
successful execution of subsequent statements
.
Dynamic SQL Error.
expression evaluation not supported
espero me puedan ayudar gracias
__________________
Espero poder seguir exprimiéndote el cerebro 8)
Jorge Zamora Ginez
Puebla, Pue. México
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 17:06:21.


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