CREATE OR ALTER TRIGGER TTBCARTAO_BANDEIRA_ADQ_BIUD998 FOR TBCARTAO_BANDEIRA_ADQUIRENTE
ACTIVE BEFORE INSERT OR UPDATE OR DELETE POSITION 998
AS
BEGIN

    IF(INSERTING) THEN
    BEGIN
        EXECUTE PROCEDURE SPI_INTEGRACAO('TBCARTAO_BANDEIRA_ADQUIRENTE', NEW.ID, 2);
    END ELSE
    BEGIN
        EXECUTE PROCEDURE SPI_INTEGRACAO('TBCARTAO_BANDEIRA_ADQUIRENTE', OLD.ID, 2);
    END

END;