Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Merging two cursors with same structure
Message
 
 
To
01/06/2010 11:05:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01466869
Message ID:
01466878
Views:
58
>>I want to add the content of a cursor to another cursor. The two cursors have the same fields.
>>
>>It would be quite simple to do this by code but I'm wondering if there is a VFP command to do that?
>
>There certainly is! Use a SQL - SELECT, with a UNION clause. That will join two tables, vertically. The structures must be identical... or at least compatible.
>
>
>select * from MyCursor1;
>  UNION select * from MyCursor2;
>  into cursor MyCursor3
>
Hilmar,

Use UNION ALL if you don't want to eliminate duplicates. It will be quicker too.
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