Sales.uSpecialOfferProduct Trigger

Information

NameSales.uSpecialOfferProduct
Table NameSales.SpecialOfferProduct
Created14.10.2005 1:59:56
Modified14.10.2005 1:59:56
Disabled 
For replication 
Instead of trigger 
Activates onUPDATE

SQL Script

CREATE TRIGGER [Sales].[uSpecialOfferProduct] ON [Sales].[SpecialOfferProduct] 
AFTER UPDATE NOT FOR REPLICATION AS 
BEGIN
    SET NOCOUNT ON;

    BEGIN TRY
        UPDATE [Sales].[SpecialOfferProduct]
        SET [Sales].[SpecialOfferProduct].[ModifiedDate] = GETDATE()
        FROM inserted
        WHERE inserted.[SpecialOfferID] = [Sales].[SpecialOfferProduct].[SpecialOfferID]
            AND inserted.[ProductID] = [Sales].[SpecialOfferProduct].[ProductID];
    END TRY
    BEGIN CATCH
        EXECUTE [dbo].[uspPrintError];

        -- Rollback any active or uncommittable transactions before
        -- inserting information in the ErrorLog
        IF @@TRANCOUNT > 0
        BEGIN
            ROLLBACK TRANSACTION;
        END

        EXECUTE [dbo].[uspLogError];
    END CATCH;
END;