>>>Hi Michel,
>>> One possible cause could be that _TALLY counts deleted records, but the scan wouldn't be looking for those. No other option comes to mind.
>>
>>Unless the WHERE excludes deleted records they will be included in the set. "SELECT" does not respect the SET DELETED.
>
>You should re-think this one.
I use SELECT with SET DELETED ON all the time and don't get any of the deleted records. So I am pretty sure that sql queries pay attention to the state of SET DELETED.
Cy Welch
Senior Programmer/Analyst
MetSYS Inc