Difference between revisions of "CREATE FROM"

From Lianjapedia
Jump to: navigation, search
Line 38: Line 38:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
[[Category:Table Basics]]
+
[[Category:Data Import]]
[[Category:Table Basics Commands]]
+

Revision as of 11:24, 4 February 2013

Purpose

Create a table from the contents of another table

Syntax

CREATE <filename1> | (<expC1>) FROM <filename2> | (<expC2>)

See Also

COPY, COPY STRUCTURE, COPY STRUCTURE EXTENDED

Description

The CREATE FROM command creates a new table, determined by the contents of a table created with the COPY STRUCTURE EXTENDED command. The filenames can be substituted with a <expC1>, enclosed in round brackets, which returns a valid filename. The FROM table consists of five fields, these are:

Field Type Width Description
FIELD_NAME Character 32 Field name
FIELD_TYPE Character 1 Data type of field
FIELD_LEN Numeric 3 Width of field
FIELD_DEC Numeric 3 Number of decimal places
FIELD_DES Character 25 Field Description

Each record of the FROM table defines a field. The structure of the new table, <filename1>, will be created from these field definitions.

Example

use patrons
copy structure extended to patstru
close patrons
create newpatron from patstru