where table3.f1 IS NULL ;>I had to alter the code, the union all as it was giving duplicates, I also removed the DISTINCTS as per sergey's suggestion this resulted in a significant difference.
>select table1.f1 from table1 left join table3 on table1.f1 = table3.f1 ; >where ISNULL(table3.f1) ; >union ; >select table2.f1 from table2 left join table3 on table2.f1 = table3.f1 ; >where ISNULL(table3.f1) ; >order by 1 into cursor curOrphans nofilter >>