Checks that table does not have unexpected number of records, report failure if actual number of records, counted base on supplied condition, is equal to expected value.
Note:
Oracle version is using DBTD_ASSERT_IS_NOT_EXPECTED_CT name due to the limitation for the length of an object names.
Arguments
-
V_NotExpectedValue - NOT expected value, INTEGER in Oracle and Netezza, BIGINT in SQL Server.
-
V_TableName – name of the table, Variable Characters (255) in Oracle and Netezza, SYSNAME in SQL Server.
-
V_Condition – where clause which is used to check number of records, Variable Characters (255) in Oracle and Netezza, NVARCHAR(MAX) in SQL Server.
-
V_UserMessage – message to report when assertion fails, Variable Characters (255) in Oracle and Netezza, NVARCHAR(MAX) in SQL Server.
Examples
SQL Server
EXEC DBTD_ASSERT_IS_NOT_EXPECTED_COUNT 10, 'table1', 'id=6453', 'TABLE1 should not have 10 records';
Oracle
DBTD_ASSERT_IS_NOT_EXPECTED_CT (10, 'table1', '', 'TABLE1 should not have 10 records');
Netezza
CALL DBTD_ASSERT_IS_NOT_EXPECTED_COUNT (10, 'table1', '', 'TABLE1 should not have 10 records');
See Also