Asserts that table or view with a given name exist in the database. Procedure will fail when object is missing.
Arguments
-
v_ObjectName –view or a table name. Supports four part object name. Variable Character(255) in Oracle and Netezza, SYSNAME in SQL Server
-
v_UserMessage – message to report when assertion fails, Variable Character(255) in Oracle and Netezza, NVARCHAR(MAX) in SQL Server
Note: Oracle uses DBTD_ASSERT_TBL_OR_VW_EXISTS assert name, which is available in Netezza and SQL Server after installing compatibility pack
Examples
SQL Server
EXEC DBTD_ASSERT_TABLE_OR_VIEW_EXISTS ‘Employee’, ‘Cannot find object’;
or
EXEC DBTD_ASSERT_TBL_OR_VW_EXISTS ‘Employee’, ‘Cannot find object’;
Oracle
DBTD_ASSERT_TBL_OR_VW_EXISTS (‘Product’, ‘Cannot find object’);
Netezza
CALL DBTD_ASSERT_TABLE_OR_VIEW_EXISTS (‘Order’, ‘’);
or
CALL DBTD_ASSERT_TBL_OR_VW_EXISTS (‘Order’, ‘’);
See Also