Advertisement
fenix15100

Untitled

Apr 6th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.49 KB | None | 0 0
  1. CREATE OR REPLACE FUNCTION aviso() RETURNS TRIGGER AS'
  2.  
  3. DECLARE
  4. min_fecha timestamp(3);
  5. BEGIN
  6.  
  7. IF(new.pres_dev=="devuelta") THEN
  8.  
  9.     select new.numcinta from prestamos where new.numcinta in(select numcinta from cintas where titulo in(
  10.         select titulo from lista_espera) and nomdirector in(select nomdirector from lista_espera));
  11.  
  12.  
  13. END;
  14. 'LANGUAGE 'plpgsql';
  15.  
  16. DROP TRIGGER aviso ON prestamo;
  17. CREATE TRIGGER aviso
  18.     AFTER UPDATE ON prestamo
  19.     FOR EACH ROW
  20.     EXECUTE PROCEDURE aviso();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement