Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange APPEND FROM problem
Message
From
28/03/2006 12:16:20
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01108188
Message ID:
01108417
Views:
14
>>Of all the suggestions made here, the one that has worked best for me across all versions of VFP is
>>
>>select * from cursor you want to append from into cursor c_AddThese NOFILTER
>>
>>select targetcursor
>>append from dbf("c_AddThese")
>>
>>That's because the select * command allows you to join from many tables, do filtering and change field names to match the target cursor all in one step.
>>
>>The final append from command is as simple as it can get.
>
>Mike,
>
>Thank you for your suggestion. I might try it and compare with the one INSERT-SQL command. My main goal is to make the resulting cursor filled as fast as possible. Secondly, if I switch the database to SQL Server, I would like to make the code work there (I am sure with some minor modifications) too. I don't think APPEND FROM is a valid syntax in SQL Server, although I may be mistaken.

select * from sourcecursor into cursor c_AddThese NOFILTER
INSERT into target select * from c_AddThese

It is seldom enough to aim for raw speed. I rarely see any piece of code that is that simple. There would often be some kind of validation or preparation of the c_AddThese records. Bearing that in mind, why not use the two cursors everytime for the sake of safety and flexibility?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform