Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Merging two cursors with same structure
Message
From
01/06/2010 11:05:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
01/06/2010 11:02:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01466869
Message ID:
01466874
Views:
56
>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
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform