SET TERM ^ ;

CREATE OR ALTER 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.VENDEDOR_ID, 2);
    END ELSE
    BEGIN
        EXECUTE PROCEDURE SPI_INTEGRACAO('TBPDV_VENDEDOR', OLD.VENDEDOR_ID, 2);
    END
END
^

SET TERM ; ^

