Assert verifies that given value with provided data type exist in the specified column. Will fails if value could not been found.
Arguments
-
v_TableName – name of the table, Variable Character(255) in Oracle and Netezza, SYSNAME in SQL Server
-
v_ColumnName - column that will be checked for a value, Variable Character(255) in Oracle and Netezza, SYSNAME in SQL Server
-
v_Value – value to be found, Variable Character(4000)
-
v_ValueDataType – type of the specified value, Variable Character(255)
-
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_HAVE_VALUE ‘ArchivedOrders’, ‘OrderID’, ‘0001B-ARCHIVED’, ‘VARCHAR(50)’, ‘Cannot find an order’;
Oracle
DBTD_ASSERT_COLUMN_HAVE_VALUE (‘ComponentParts’, ‘PartNumber’, ‘ZB0023gdt-35’, ‘VARCHAR(50)’, ‘missing part has been identified’);
Netezza
CALL DBTD_ASSERT_COLUMN_HAVE_VALUE (‘Car’, ‘NumberOfAxels’, ‘2’, ‘INT’, ‘table should have at list a few cars with two axels’);
See Also