CREATE OR REPLACE PROCEDURE sp_fco_baja_ausentismos
(
    pch_compania    char,
    pin_id_ausentismo  int
)
AS
BEGIN
    INSERT INTO fco_ausentismos_historico
    SELECT * FROM fco_ausentismos
    WHERE compania = pch_compania And 
          id_ausentismo = pin_id_ausentismo;

    DELETE fco_ausentismos
    WHERE compania = pch_compania And 
          id_ausentismo = pin_id_ausentismo;
          
    COMMIT;
END;
/
CREATE PUBLIC SYNONYM sp_fco_baja_ausentismos FOR ADAM.sp_fco_baja_ausentismos;
GRANT EXECUTE ON sp_fco_baja_ausentismos TO adama;
