>>As far as IN has limitations about number of listed values (I think 127), I would prefer the solution with temp table.
>
>127 might be a VFP limitation. I've had more items than that in a IN list.
>
>-Mike
I often use dynamically constructed IN clauses, but in this case it seems for me that join with temporary table could be executed faster than IN. May be better solution is to be made profile of both variants and then to be chosen better (and may be faster) one.
Venelina Jordanova
Outsourcing IT Services Ltd.