Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Merging two cursors with same structure
Message
 
 
À
01/06/2010 11:05:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01466869
Message ID:
01466878
Vues:
59
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform