CREATE trigger ttbpdv_vendedor_biud998 for tbpdv_vendedor
active before insert or update or delete position 998
AS
BEGIN
    IF(INSERTING) THEN
    BEGIN
        EXECUTE PROCEDURE SPI_INTEGRACAO('TBPDV_VENDEDOR', NEW.ID, 2);
    END ELSE
    BEGIN
        EXECUTE PROCEDURE SPI_INTEGRACAO('TBPDV_VENDEDOR', OLD.ID, 2);
    END
END;