Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. DELIMITER //
  2. CREATE TRIGGER TRG_FACTURA_ADD AFTER UPDATE
  3. ON FACTURA
  4. FOR EACH ROW
  5. BEGIN
  6. IF OLD.monto_resta <= 0 AND NEW.monto_resta > 0 THEN
  7. INSERT INTO bolsa_factura(id_bolsa, id_factura, fecha_telcel)(SELECT id_bolsa, id_factura, CURRENT_TIMESTAMP
  8. FROM historico_bolsa_factura
  9. WHERE id_factura = OLD.id_factura
  10. LIMIT 1);
  11. END IF;
  12. END;
  13. //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement