Difference between revisions of "CREATE FROM"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Create a table from the contents of another table
 
Create a table from the contents of another table
 
  
 
==Syntax==
 
==Syntax==
 
CREATE <filename1> | (<expC1>) FROM <filename2> | (<expC2>)
 
CREATE <filename1> | (<expC1>) FROM <filename2> | (<expC2>)
 
  
 
==See Also==
 
==See Also==
[[COPY]], [[COPY STRUCTURE]], [[COPY STRUCTURE EXTENDED]], [[CREATE]], [[SET CLIPPER]]
+
[[COPY]], [[COPY STRUCTURE]], [[COPY STRUCTURE EXTENDED]]
 
+
  
 
==Description==
 
==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:
 
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:
  
 
+
{| class="wikitable" width="100%"
{| class="wikitable"
+
!Field||Type||Width||width="45%"|Description
!Field||Type||Width||Description
+
 
|-
 
|-
 
|FIELD_NAME||Character||32||Field name
 
|FIELD_NAME||Character||32||Field name
Line 29: Line 25:
 
|-
 
|-
 
|}
 
|}
 
  
 
Each record of the FROM table defines a field.  The structure of the new table, <filename1>, will be created from these field definitions.
 
Each record of the FROM table defines a field.  The structure of the new table, <filename1>, will be created from these field definitions.
 
  
 
==Example==
 
==Example==
Line 42: Line 36:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
[[Category:Table Basics]]
+
[[Category:Data Import]]
[[Category:Table Basics Commands]]
+
[[Category:NoSQL Commands]]

Latest revision as of 08:57, 5 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