Difference between revisions of "COPY STRUCTURE EXTENDED"
Helengeorge (Talk | contribs) (→Class) |
Helengeorge (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Create a table with records containing field definitions | Create a table with records containing field definitions | ||
Line 52: | Line 50: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
[[Category:Table Basics]] | [[Category:Table Basics]] | ||
[[Category:Table Basics Commands]] | [[Category:Table Basics Commands]] |
Latest revision as of 15:19, 10 November 2009
Contents
Purpose
Create a table with records containing field definitions
Syntax
COPY STRUCTURE EXTENDED TO <.dbf filename> | (<expC>) [FIELDS <field list>]
See Also
COPY, COPY FILE, COPY STRUCTURE, CREATE FROM, MODIFY STRUCTURE, REPLACE
Description
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 | Type | Length | Description |
---|---|---|---|
FIELD_NAME | Character | 32 | Field name |
FIELD_TYPE | Character | 1 | Data type |
FIELD_LEN | Numeric | 3 | Width of field |
FIELD_DEC | Numeric | 3 | Number of decimal places |
FIELD_DES | Character | 25 | Field description |
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>.
Example
use patrons copy structure extended to patstru select workarea() create newpatrons from patstru
Products
Recital Server, Recital