SQL Server中的DML触发器

时间:2018-07-15 21:50:24

标签: sql sql-server

这是我的代码

ALTER TRIGGER [CoSD].[BusinessLogicUtilTrigger] 
ON [CoSD].[ERSConstructedVariablesOutcomes]
AFTER INSERT, UPDATE
AS
    ;WITH dataforIDs AS
    (
        SELECT 
            value, ERSBusinessLogic_InputDataSeries
        FROM  
            [AnimalProductsCoSD].[CoSD].[ERSBusinessLogic]
        CROSS APPLY
            (SELECT
                 Seq = ROW_NUMBER() OVER (ORDER BY (SELECT NULL)),
                 Value = v.value('(./text())[1]', 'VARCHAR(MAX)')
             FROM
                 (VALUES (CONVERT(XML, '<x>' + replace(ERSBusinessLogic_InputDataSeries,',','</x><x>')+'</x>'))) x(n)
        CROSS APPLY
            n.nodes('x') node(v)) B
        WHERE
            ERSBusinessLogic_InputGeographyDimensionID = 7493
            AND ERSBusinessLogic_InputTimeDimensionValue = 'all months'
            AND ERSBusinessLogic_Type = 'HS10 aggregation'
    )

在存储过程完成执行之后,是否有任何方法可以修改它调用的触发器。现在,我感觉一旦插入一行就被称为。

简而言之,我想要一个触发器,该触发器将在存储过程执行后调用,或者还有其他方法可以实现吗?

0 个答案:

没有答案