Version_View_Name

Definition

Version_View_Name takes a table as an input parameter and returns the name of the versioned view defined on that table. A null string or error message is returned if the table does not have a versioned view. A table will not have a versioned view defined on it if one of the following is true:

Syntax

<geodatabase administrator schema>.version_view_name (<table owner>, <table name>)

In most geodatabases, the geodatabase administrator schema is sde. However, it is dbo in dbo-schema geodatabases in SQL Server, and in user-schema geodatabases in Oracle, it is the name of the user's schema.

Return type

String

Examples

The following are examples of using the Version_View_Name function in each database type.

The first example queries for the name of the versioned view associated with the crops table owned by tech1.

The second example queries the livestock table. The livestock table does not have a versioned view associated with it.

DB2

VALUES sde.version_view_name('TECH1', 'CROPS')

CROPS_EVW
VALUES sde.version_view_name('TECH1', 'LIVESTOCK')

Oracle

SELECT sde.gdb_util.version_view_name('TECH1', 'CROPS')
FROM DUAL;

SDE.GDB_UTIL.VERSION_VIEW_NAME('TECH1', 'CROPS')
--------------------------------------------------
CROPS_EVW
SELECT sde.gdb_util.version_view_name('TECH1', 'LIVESTOCK')
FROM DUAL;

SDE.GDB_UTIL.VERSION_VIEW_NAME('TECH1', 'LIVESTOCK')
----------------------------------------------------

PostgreSQL

SELECT sde.version_view_name('tech1', 'crops');

crops_evw
SELECT sde.version_view_name('tech1', 'livestock');

NO VERSION VIEW FOUND

SQL Server

SELECT sde.version_view_name('tech1', 'crops');

CROPS_EVW
SELECT sde.version_view_name('tech1', 'livestock');
6/19/2015