>My first attempt was to create syntax like this:
>select * from ...
>where ... and town in (select BtcCode from temptable).
I imagine that you don't have an index on your temptable. Have you tried creating one to see if performance increases?
Hector Correa