• Here's a setup to play with including some tests to check whether a sproc will be fired or not.

    USE tempdb

    GO

    if object_id('temp','U') is not null drop table temp

    CREATE TABLE temp( idCourse INT, Libelle VARCHAR(300))

    GO

    CREATE TRIGGER compare

    ON temp

    INSTEAD OF UPDATE

    AS

    BEGIN

    -- check if there is one single row where the value of column Libelle has changed

    IF EXISTS

    (

    SELECT 1

    FROM DELETED d

    INNER JOIN INSERTED i ON i.idCourse = d.idCourse

    WHERE i.Libelle <> d.Libelle

    )

    BEGIN

    PRINT 'FIRE STORE PROCEDURE'

    END

    ELSE

    BEGIN

    PRINT 'NOT FIRE STORED PROCEDURE'

    END

    END

    GO

    INSERT INTO temp

    SELECT 1,'1' UNION ALL

    SELECT 2,'2'

    UPDATE temp

    SET Libelle = Libelle+1

    UPDATE temp

    SET Libelle = Libelle+1

    WHERE idCourse = 2

    UPDATE temp

    SET Libelle = Libelle

    WHERE idCourse = 2

    UPDATE temp

    SET Libelle = Libelle+1

    WHERE idCourse = 3



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]