Entering content frame

 Anlegen einer Viewtabelle 

Use

You can use SQL Studio to create view tables.

Prerequisites

·        If you want the view table to be based on a database query, you must have already saved this query as an SQL Studio object.

·        You have the necessary user authorizations and the user attribute NOT EXCLUSIVE.

For an explanation of user authorizations and user attributes, see the User Concept section of the documentation Database Administration and the Authorization section of the Reference Manual.

Procedure

...

       1.      Choose Catalog Manager ® New ® View Definition.
A window for defining the view table is opened.

       2.      To use a database table as a basis for the view table, choose View Definition  ® Get Table. Select the relevant database table, and choose OK to confirm.

       3.      To use the structure of the result set of a stored database query as the basis for the view table, choose View Definition  ®Get Stored Query. Select the relevant database query, and choose OK to confirm.

       4.      Enter a name for the view table.

       5.      If you want to rename the columns of your view table, enter the new column names in Alias in View.

       6.      Select the required options:

Replace Existing View

Replace the existing view table

Check on Insert or Update

Check the view conditions when changing values

Identifiers Uppercase

Automatic conversion of table names and column headers into upper case.

       7.      Choose View Definition ® Create View.

To export the SQL statement for creating the view table to the SQL dialog, choose View Definition ® Export to SQL Dialog.

For information on the syntax of CREATE VIEW statements, see the CREATE VIEW Statement section of the Reference Manual.

 

Leaving content frame