• anitha is incorrect, he's confusing the way oracle or other databases handle triggers, vs the way SQL Server works.

    SQL Server's trigger is called once for any statement, whether it is one row or a million rows.

    in your case, since you need to call a stored proc to send your email, you'd want to do call the procedure one time for each row inserted.

    this trigger I'm pasting below would correctly execute for each item that met the criteria; note the one thing missing is the Primary key of the inserted and deleted tables..i assumed "ID" was the column name, but you'd need to change that.

    --USE [TRAIN]

    GO

    /****** Object: Trigger [dbo].[tr_CHECK_SRVSTAT] Script Date: 07/21/2009 09:47:25 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    ALTER TRIGGER [dbo].[tr_CHECK_SRVSTAT]

    ON [TRAIN].[dbo].[SVC00200]

    AFTER UPDATE

    AS

    BEGIN --Trigger body

    DECLARE @CALLNBR VARCHAR(64)

    DECLARE C1 CURSOR FOR

    SELECT

    INSERTED.CALLNBR

    FROM INSERTED

    INNER JOIN DELETED

    ON INSERTED.ID = DELETED.ID

    WHERE INSERTED.SRVSTAT DELETED.SRVSTAT --had to change from previous value

    AND INSERTED.SRVSTAT= 800 --changed to 800

    OPEN C1

    FETCH NEXT FROM C1 INTO @CALLNBR

    WHILE @@fetch_status -1

    BEGIN

    EXEC sp_webServiceRequest_EmailComplete @CALLNBR

    FETCH NEXT FROM C1 INTO @CALLNBR

    END

    CLOSE C1

    DEALLOCATE C1

    END--Trigger body

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!