Sergey,
I missed the first part, you're referring to, but I observed in VFP6, that scatter memvar/gather memvar (insert from memvar) was few times faster than scatter name oRecord. Do you have some stats about the speed difference in VFP8?
Thanks.
>Cetin,
>
>You can use DO WHILE instead of SCAN for outer loop because actual record scan done in inner SCAN loop.
>***scan
>LOCATE
>DO WHILE NOT EOF()
> oRecord.id = crsTemp.ID
> scan while ID = oRecord.id
> store FieldValue to ('oRecord.'+fieldname)
> endscan
> ***skip -1
> select NewTable
>* Could also use scatter memvar, insert into .. from memvar
> append blank
> gather name oRecord
> scatter name oRecord blank
> select crsTemp
>ENDDO
>***endscan
>
>>>unfortunately, you is right, my table have a dozen extra fields, then...:(
>>
>>Fbilo,
>>As I said wouldn't try to do with SQL directly.
>>Supposing your fieldname field doesn't contain any value that's illegal for a fieldname and number of distinct fieldnames isn't over 254 (+1 for id - table column limit) :
>>
>< snip >
If it's not broken, fix it until it is.
My Blog