>I suppose I could do that. I have not tried that approach before. I suspect in this case that all the trimming and padding I'm doing defeats the indexes, making this a long running prospect, but I fear getting less accurate results.
>
>My brain is a bit fuzzy today, but I wonder if there's a definitive way to test that the results are identical between 2 queries, if I want to test various approaches? If I get a result cursor with 1100 rows, can I quickly prove that results remain identical?
>
>>Can you just build your select as a string (using textmerge) and then execute using macro substitution? This way you would not need such complex logic.
>>
select *, 'Missing' as cInfo from FirstResult where ID not in (select ID from mySecondResult) ;
union all ;
select *, 'Extra ' as cInfo from mySecondResult where ID not in (select ID from FirstResult)
If it's not broken, fix it until it is.
My Blog