Validates that provided table (or a view) have a column with the specified name. Assert will fail when column does not exist in the provided object.

Arguments

  • v_ObjectName – table or view name. Supports four part object name. Variable Character(255) in Oracle and Netezza, SYSNAME in SQL Server
  • v_ColumnName – name of the column, 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

 

Examples

SQL Server 

      EXEC DBTD_ASSERT_COLUMN_EXISTS 'myTable', 'myColumn', 'Cannot find object';

Oracle 

      DBTD_ASSERT_COLUMN_EXISTS ('Product', 'Name', 'Cannot find object');

Netezza

      CALL DBTD_ASSERT_COLUMN_EXISTS ('Bus', 'RouteNumber', '');

 

See Also