COPY STRUCTURE EXTENDED
Create a table with records containing field definitions
COPY STRUCTURE EXTENDED TO <.dbf filename> | (<expC>) [FIELDS <field list>]
The COPY STRUCTURE EXTENDED command operates on the currently active table and creates a new table with records containing the active table's structure. The new table has five fields:
|FIELD_LEN||Numeric||3||Width of field|
|FIELD_DEC||Numeric||3||Number of decimal places|
A record is created for each field from the active table, so that each record contains a complete field definition. Once a table has been created in this manner, it can be used to build a new table structure. The records containing the field definitions can be modified in the same way as any standard records (EDIT, REPLACE etc). The CREATE FROM command can then use this structure table as the source for a new table.
TO <.dbf filename>
The TO <.dbf filename> can be substituted with any <expC>, enclosed in round brackets, which returns a valid filename.
FIELDS <field list>
If the optional FIELDS clause is specified, then the operation is restricted to those fields named in the comma separated <field list>.
Note: if a database is open, the table will be created in the database. Tables with names starting with an underscore are not added to the currently open database.
use patrons copy structure extended to patstru select workarea() create newpatrons from patstru