Checks that table has expected number of records, report failure if actual number of records counted base on supplied condition is not equal to expected value.

Arguments

  • V_ExpectedValue - 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_EXPECTED_COUNT 10, ‘table1’, ‘id=12345’, ‘TABLE1 should have 10 records’;

Oracle

      DBTD_ASSERT_IS_EXPECTED_COUNT (10, ‘table1’, ‘’, ‘TABLE1 should have 10 records’);

Netezza

      CALL DBTD_ASSERT_IS_EXPECTED_COUNT (10, ‘table1’, ‘’, ‘TABLE1 should have 10 records’);

 

See Also