Hi Henry,
>Thanks for your quick response.
no problem!
>If I understand correctly, without NOFILTER, the result is not 'always' written to disk as a temp table and therefore can be inaccessible to subsequent queries ?
That's correct!
>Just out of curiosity: how is it stored without NOFILTER (or the extra column) ? I'm just trying to understand the intermittent nature of the error.
VFP sometimes simply creates a filtered "view" on a table when you're doing a query - just like you could do with the SET FILTER (that's why they called that VFP7/8 keyword NOFILTER) command. Therefore, the result is only available in memory.
In previous versions of VFP you needed to add a constant to a Select's field list to force VFP to create a temporary table on the HD. From VFP7 on, you can use the NOFILTER keyword to force that behaviour. So if you want to be sure that you can access a query result in subsequent queries, do one of those two things. But you have to be aware that using one of these two options can slow down your queries. If you don't really need them, leave them away.
BTW: There's a quite good explanation of this in the VFP7/VFP8 help file in the SELECT-SQL command description.
Hope this satisfies your curiosity :)
Regards,
Armin