addSqlView

The addSqlView element allows a new SQL View to be added to the schema. When creating a new SqlView, you must create at least one SqlView column, as shown in the example below.

Example:

<addSqlView name="my_new_SQL_view" id="4040">
    <description>my SQL view description</description>
    <sql>select web_login as owner from table_user union select req_originator as owner from table_fcs_detail</sql>
 </addSqlView>

 <addSqlViewColumn name="owner" sqlView="my_new_SQL_view" dataType="String" >
     <length>40</length>
     <description>description for sql view column</description>
  </addSqlViewColumn>


Required Attributes:

Attribute Name

Description

name

Specifies the name of the SQL View. This must be a unique name amongst all tables and views.

id

Specifies the id number of the SQL View. This must be a unique id amongst all tables and views. The customer range for IDs is 430-511 and 2000-4999.


Required Child Elements:

Element Name

Description

sql

The actual SQL that defines the view.

Optional Attributes

Name

Description

targetDatabase

Users of Amdocs 6 or later databases can specify this optional targetDatabase attribute when using Amdocs 6 compatible Schema scripts.

Sql elements with no targetDatabase attribute are the default SQL statement for the view.

When a sql view has a targetDatabase specified that matches the database the schema script is being applied against. Database specific version of the SQL statement will be used.

Possible targetDatabase attribute values are:

  • mssql
  • oracle
  • db2

 


Optional Child Elements:

Element Name

Default

Description

description

 

Description of the SQL View and its purpose.

groupName

 

Specifies the name of the application module that the SQL View is used by.

baseTable

 

Specifies the name of the main tables used in the view.

See Also

schemaScript

addColumn

addExclusiveRelationSet

addIndex

addJoin

addRelation

addSqlViewColumn

addTable

addView

addViewColumn

updateColumn

updateIndex

updateJoin

updateRelation

updateTable

updateSchema

updateSqlView

updateSqlViewColumn

updateView

updateViewColumn

Next

addSqlViewColumn

addSqlView