wrote:
contains the following statement about NOT IN:
you need to be cautious when using the NOT IN operator if the subquery’s source data contains NULL values. If so, you should consider using a NOT EXISTS operator instead of NOT IN, or recast the statement as a left outer join.
Maybe this relates to your problem.
Regards,
Daniel
It seems that this is the situation.
My question now is: why is it considering zero as null?