User Guide : 6. Working with Databases : Working with Views : New View Dialog
 
Share this page                  
New View Dialog
You use the New View dialog to create a view in a database.
You can open this dialog the following ways:
From the context menu of a database’s Views folder or view node: New View
On the main menu ribbon when a Database node, view node, or Views folder is selected in the Instance Explorer: Database, View, New View (see Database Tab)
For more information, see Create a View.
The New View dialog contains the following pages:
Tables & Views
Columns
Additional SQL
Tables & Views Page
This page lists existing tables and views on their respective tabs with the following options:
Name
Specifies the name of the view you are creating
Include System Objects
Specifies whether system tables and views in the database should be included on the Tables and Views tabs. System object names begin with “$ingres”.ii_.
Tables tab
Lists the user-created tables in the database. If Include System Objects is selected, this tab also lists system tables in the database.
Views tab
Lists the user-created views in the database. If Include System Objects is selected, this tab also lists system views in the database.
Script results to new query window
Specifies that the query text is copied to a query document instead of being executed. You may then edit the SQL before executing it (see Execute a Query).
Columns Page
This page lets you specify whether to include all columns or only specific columns from the tables and views selected on the Tables & Views page. If you choose to specify particular columns, you may change the name of the column in the view by entering the new name in the Column Alias field.
The output columns of the SELECT are matched in the order they appear, with the column names specified. The column names are used in the new table. For example, if your SELECT statement contains:
SELECT a,b,c from table...
and you specify column aliases apple, banana, cherry, the new table will contain columns named apple, banana, cherry. If there are more columns in the result than you have provided, the remaining columns in the result will not be renamed but will retain the names from their source.
Note:  Director validates the names of the columns to ensure they are valid database names (see Object Naming Rules). All other validation is left to the DBMS.
Additional SQL Page
This page lets you qualify your query statement and see how it is formed. It contains the following areas and options:
Where Clause/Additional SQL
Lets you qualify the SELECT statement with qualifiers such as WHERE
With Check Option
Prevents the execution of an insert or update to a view that creates a row that does not comply with the view definition (the qualification specified in the WHERE clause).
If the With Check Option is not specified, any row in the view can be updated, even if the update results in a row that is no longer a part of the view.
You cannot update or insert into a view that is defined on top of a view specified with the With Check Option if the resulting rows violate the qualification of the underlying view.
Create Statement
Displays the CREATE VIEW SQL statement that is being built, based on your selections on the previous pages
OK button
Attempts to create the view using the information entered on the dialog. If successful, the new view node is displayed in the Instance Explorer.
Cancel button
Cancels the creation of the view and closes the dialog