Bases de Datos > Otras Bases de Datos
Xq No Funcionan Las Sumas En Los Triggers? En Sql
(1/1)
maikmr:
--- Código: Text --- CREATE TRIGGER sumaron historial_laboralfor update asDeclare @Id_historyLab intDeclare @monto floatDeclare @neto float set @Id_historyLab=(select max(Id_historyLab) from historial_laboral)set @monto = (select salario_neto from historial_laboral where Id_historyLab = @Id_historyLab) update historial_laboralset salario_neto= (@monto+1000.0)where Id_historyLab = @Id_historyLab
Intente hacer una suma en un trigger pero no funciono, esta donde yo se deberian funcionar pues yo eh visto que si se pueden hacer operaciones aristmeticas en las bases de Datos.
gracias.
Navegación
Ir a la versión completa