Hi Sebastian,
On going thru your code, i could notice that you are delete the records by ...WHEN SOURCE NOT MATCHED THEN DELETE;
i suppose that it would delete all other records which doesn't meet the on clause join condition of the merge, like orderdetails of other orders ..........
Pls. clarify me...