Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy stru command
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00186818
Message ID:
00186825
Vues:
10
>>Is there a way to have dbf1 have dbf2's structure appended to it?
>>thanks.
>
>I don't know of a single command (a la COPY STRU) to do it, but you can do it pretty readily with AFIELDS() commands and array manipulation commands.
>
=AFIELDS(Struc1Arr, "Table1")	&& Not sure about quotes
>=AFIELDS(Struc2Arr, "Table2")
>then code to concatenate the second array onto the first, create a table from it using CREATE Table3 FROM ARRAY Struc1Arr, and APPEND FROM Table1 if you wanted the records besides the structure.

Wish I'd waited. Ed's answer is better, using COPY STRU EXTENDED.

Cheers,
Rich.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform