$ 0 0 1st step: rewrite the NOT IN to NOT EXISTS (rule of thumb: try to avoid NOT IN as much as possible) And the logic is quite complex, did you check if it could be simplified? The base table is always the same. Dieter
1st step: rewrite the NOT IN to NOT EXISTS (rule of thumb: try to avoid NOT IN as much as possible)
And the logic is quite complex, did you check if it could be simplified? The base table is always the same.
Dieter