Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to write this SQL Statement?
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00737372
Message ID:
00738264
Views:
15
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 && VFP8 : insert into NewTable from name oRecord
>* 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform