Ver Mensaje Individual
  #1  
Antiguo 03-05-2006
Avatar de marceloalegre
[marceloalegre] marceloalegre is offline
Miembro Premium
 
Registrado: abr 2005
Ubicación: Mar del Plata - Argentina
Posts: 448
Reputación: 20
marceloalegre Va por buen camino
Post Sumar 1 Segundo A 'now'

Buenas tardes amigos:
Consultita simple la mia!
Les cuento, tengo este triger:
Código SQL [-]
AS
declare variable aux timestamp;
begin
  if ((old.autorizacion != new.autorizacion) or
     (old.fechavalidez != new.fechavalidez)) then
  begin
    select max(fechahorahasta) from autorizacion into :aux;
    if (:aux > 'NOW') then
    update autorizacion set fechahorahasta = 'NOW'
    where
    fechahorahasta = :aux;
    insert into AUTORIZACION (NRODEAUTORIZACION,FECHAHORADESDE,FECHAHORAHASTA)
    values (new.autorizacionsri,'NOW',new.fechavalidez);
  end
end
donde al ultimo 'NOW' quiero sumarle 1 segundo cuando hace el insert ...

Me pueden ayudar?

Última edición por vtdeleon fecha: 04-05-2006 a las 23:40:45.
Responder Con Cita