Everywhere I am reading, when a merge statement happens, it will fire the triggers (INSERT, UPDATE, DELETE) in no particular order. I have a basic merge:
MERGE dbo.Users WITH(HOLDLOCK) as tgt USING #Users as src ON tgt.ID = src.ID WHEN NOT MATCHED BY INSERT (..) VALUES(..) OUTPUT INSERTED.ID, src.UserID into #Results;
However, I have an insert trigger on Users but nothing ever gets run from the trigger perspective. Follow-up update statements do get run and I see the results of those trigger executions, just not the inserts from the merge.
Is there anything I can do about that? I'm surprised it's not working when it's documented that others do get that functionality to work...