it does not matter, you do a group by on the primary key, then compare and insert the not found.
So the question is, when does a group by do not return a primary key combination? And when does the comparison not work?
I have NULL values in mind and more likely, data type conversions.
Example: In the source ID1 is datetime like 2009.12.31 13:56, in the target it is a date only. So the group by will return different records per time and during the insert the time portion is truncated making multiple records of the same day with different time portions the same.
You TC tries to find a record for 13:56 but can’t due to the date datatype (not datetime).