Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy stru command
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00186818
Message ID:
00186825
Views:
11
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform