Difference between revisions of "CREATE VIEW"

From Recital Documentation Wiki
Jump to: navigation, search
(Products)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=CREATE VIEW=
 
 
 
==Class==
 
Terminal Developer Development Tools
 
 
 
 
==Purpose==
 
==Purpose==
 
Activate the View Designer
 
Activate the View Designer
Line 11: Line 4:
  
 
==Syntax==
 
==Syntax==
CREATE VIEW <filename> | (<expC>)
+
CREATE VIEW <filename> | (<expC>) [FROM ENVIRONMENT]
 
+
[FROM ENVIRONMENT]
+
  
  
 
==See Also==
 
==See Also==
[[CREATE BRIDGE]], [[CREATE SCREEN]], [[DIALOG GET]], [[MODIFY SCREEN]], [[SET FORMATE]], [[SET VIEW]], [[USE]]
+
[[CREATE BRIDGE]], [[CREATE SCREEN]], [[DIALOG GET]], [[FMT()]], [[Function Keys]], [[INDEX]], [[MODIFY SCREEN]], [[SET FORMAT]], [[SET INDEX]], [[SET ORDER]], [[SET RELATION]], [[SET VIEW]], [[USE]]
  
  
 
==Description==
 
==Description==
The CREATE VIEW command activates the full screen View Designer which is used to create a view file, which can be processed using the SET VIEW TO command.  View files allow you to treat multiple databases and their associated files as a single object.  Views are very useful for performing ad-hoc queries on data that is in multiple related databases.
+
The CREATE VIEW command activates the full screen View Designer which is used to create a view file, which can be processed using the SET VIEW TO command.  View files allow you to treat multiple tables and their associated files as a single object.  Views are very useful for performing ad-hoc queries on data that is in multiple related tables.
  
 
====<filename> | (<expC>)====
 
====<filename> | (<expC>)====
Line 35: Line 26:
 
!Field||Description
 
!Field||Description
 
|-
 
|-
|Database||The name of the table to be opened in this workarea
+
|Table||The name of the table to be opened in this workarea
 
|-
 
|-
 
|Alias||The alias name for the table.  By default this is the workarea letter A-J
 
|Alias||The alias name for the table.  By default this is the workarea letter A-J
Line 60: Line 51:
 
|Workarea||Displays a DIALOG GET to specify the workarea number (1-10) to select
 
|Workarea||Displays a DIALOG GET to specify the workarea number (1-10) to select
 
|-
 
|-
|Databases||Displays a popup choicelist of tables in the current directory
+
|Tables||Displays a popup choicelist of tables in the current directory
 
|-
 
|-
 
|Formats||Displays a popup choicelist of screen format files in the current directory
 
|Formats||Displays a popup choicelist of screen format files in the current directory
Line 75: Line 66:
 
A specific view file can be opened directly using the SET VIEW TO <filename> command, or by creating a VIEW BRIDGE with the CREATE BRIDGE command then issuing the USE <view bridge> command.
 
A specific view file can be opened directly using the SET VIEW TO <filename> command, or by creating a VIEW BRIDGE with the CREATE BRIDGE command then issuing the USE <view bridge> command.
  
All Recital products support the [[SQL CREATE VIEW]] command.  This creates a logical view of one or more tables based on a [[SELECT|SQL SELECT]] statement.  Please see the SQL documentation for further information.
+
All Recital products support the [[SQL CREATE VIEW]] command.  This creates a logical view of one or more tables based on a [[SQL SELECT|SELECT]] statement.  Please see the SQL documentation for further information.
  
  
Line 86: Line 77:
  
 
==Products==
 
==Products==
Recital Terminal Developer
+
Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 +
[[Category:Terminal Development Tools]]
 +
[[Category:Terminal Development Tools Commands]]

Latest revision as of 15:38, 10 November 2009

Purpose

Activate the View Designer


Syntax

CREATE VIEW <filename> | (<expC>) [FROM ENVIRONMENT]


See Also

CREATE BRIDGE, CREATE SCREEN, DIALOG GET, FMT(), Function Keys, INDEX, MODIFY SCREEN, SET FORMAT, SET INDEX, SET ORDER, SET RELATION, SET VIEW, USE


Description

The CREATE VIEW command activates the full screen View Designer which is used to create a view file, which can be processed using the SET VIEW TO command. View files allow you to treat multiple tables and their associated files as a single object. Views are very useful for performing ad-hoc queries on data that is in multiple related tables.

<filename> | (<expC>)

The file name can be substituted with a <expC>, enclosed in round brackets, which returns a valid filename. If no file extension is specified, then '.vue' is used.

FROM ENVIRONMENT

If the optional FROM ENVIRONMENT clause is specified, a view file is automatically created for the established environment.

Without the FROM ENVIRONMENT clause, the CREATE VIEW command displays a screen for each workarea (1–10), prompting for the following details:


Field Description
Table The name of the table to be opened in this workarea
Alias The alias name for the table. By default this is the workarea letter A-J
Format The screen format file to be used. (CREATE SCREEN, SET FORMAT)
Index (1-7) The names of up to seven single index files (.ndx)
Filter The filter expression for the table
Relation to The name of a field in the current table used to link to another table
Into The name of the table that is the target of the relation


The menubar for the View Designer can be activated by pressing the [MENUBAR] key. The following options are available:


Menu Description
Workarea Displays a DIALOG GET to specify the workarea number (1-10) to select
Tables Displays a popup choicelist of tables in the current directory
Formats Displays a popup choicelist of screen format files in the current directory
Indexes Displays a popup choicelist of single index files in the current directory
Query Displays a popup query builder. This is used for constructing a filter expression
Help Displays the on-line help system


A specific view file can be opened directly using the SET VIEW TO <filename> command, or by creating a VIEW BRIDGE with the CREATE BRIDGE command then issuing the USE <view bridge> command.

All Recital products support the SQL CREATE VIEW command. This creates a logical view of one or more tables based on a SELECT statement. Please see the SQL documentation for further information.


Example

create view patrons
set view to patrons


Products

Recital