>>>>Try
>>>>APPEND FROM (DBF("MyView"))
>>>>* Or
>>>>INSERT INTO mytable (<field list>)
>>>>SELECT <field list> FROM MyView
>>>>
>>>
>>>I temporarily forgot about Fox's powerful SELECT-SQL command; I think I'll go with that one.
>>>Thanks Sergey!
>>
>>It's not SELECT-SQL, it's Insert-SQL <g>
>
>Hi Naomi,
>
>I used a SELECT-SQL from the Remote View into a cursor, for needed columns only; this part works fine. The final destination for the data, however, is actually a DBF that I need to refresh. It needs to be totally overwritten by the contents of the cursor. I wanted to avoid the ZAP/APPEND commands to refresh it since it's sometimes dangerous to ZAP tables.
>
>Could you suggest an alternative? Some form of INSERT-SQL or UPDATE-SQL?
Both - you can't update records which don't exist, so you must insert them first; and you shouldn't insert the same records twice, right? Therefore, updates where {key exists}, insert where {key not found in target table}.
There's maybe a simpler way - just delete the records which would be updated, then insert all. I've done it in one situation, when I was updating a remote server. I'd create a temp table, insert into it, then delete from target table for all keys found in the temp table, then insert all from the temp table into the target table, then discard the temp table. The good side of this was the single trip to the server - all of these commands can be sent at once, I didn't need to retrieve anything to know what to send.