Tema: Trigger
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/01/2007, 09:24
seanchan
 
Fecha de Ingreso: junio-2006
Mensajes: 87
Antigüedad: 17 años, 10 meses
Puntos: 0
Re: Trigger

Pues el error te lo dice: el trigger tiene errores de compilación y no se puede ejecutar. Te pongo lo que veo. Que quieres hacer exactamente con el trigger?

Código:
create trigger INSERTAR_USO_SINTONIA
before insert on USO_SINTONIA
for each row
begin

-----
--ESTA SELECT AQUI NO SE UTILIZA PARA NADA ADEMAS DA ERROR 
--PORQUE TIENES QUE UTILIZAR UN SELECT .... INTO.... FROM... WHERE...
-----

select codigo, codigo_uso
from USO_SINTONIA, SINTONIA
where USO_SINTONIA.codigo_uso = SINTONIA.codigo;

exception

--TIENE QUE SER WHEN NO_DATA_FOUND THEN

if no_data_found then  
insert into SINTONIA(codigo) values (:new.uso_sintonia);
end;