MERGE [dbo].[ParentTaskExecutions] AS T
    USING (VALUES (@ChildTaskId, @ParentTaskId)) AS S([ChildTaskId], [ParentTaskId])
    ON T.[ChildTaskId] = S.[ChildTaskId] AND T.[ParentTaskId] = S.[ParentTaskId]
    WHEN NOT MATCHED THEN
    INSERT ([ChildTaskId], [ParentTaskId])
    VALUES (S.[ChildTaskId], S.[ParentTaskId]);
