>It was close enough to get me in the right direction :o) The 2nd part has remained the same. I still have to test it on systems with > 100,000 records. It does test faster than the original. I don't know yet if it is fast enough.
>
>
As I said, please compare the results between this variation and UNION ALL (or just UNION) variation. I expect it would yield different results in each case - you need to determine which logic is closer to your requirements.
As for speed, I expect that UNION version will perform with the same speed or may be even faster, but I would appreciate your test cases results, if you can post them here.
If it's not broken, fix it until it is.
My Blog