Assert validates that both provided tables have same number of rows. Assert will fail if tables have different row counts.

Arguments
  • v_TableNameA – name of the first table, Variable Character(255) in Oracle and Netezza, SYSNAME in SQL Server
  • v_TableNameB – name of the second table, 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_SAME_NMBR_OF_ROWS assert name, which is available for Netezza and SQL Server after installing compatibility pack

Examples

SQL Server 

      EXEC DBTD_ASSERT_SAME_NUMBER_OF_ROWS ‘sourceTable’, ‘destinationTable’, ‘Tables should have same number of rows’;

      or

      EXEC DBTD_ASSERT_SAME_NMBR_OF_ROWS ‘sourceTable’, ‘destinationTable’, ‘Tables should have same number of rows’;

 

Oracle 

      DBTD_ASSERT_SAME_NMBR_OF_ROWS (‘sourceTable’, ‘destinationTable’, ‘Tables should have same number of rows’);

Netezza

      CALL DBTD_ASSERT_SAME_NUMBER_OF_ROWS (‘sourceTable’, ‘destinationTable’, ‘Tables should have same number of rows’);

      or

      CALL DBTD_ASSERT_SAME_NMBR_OF_ROWS (‘sourceTable’, ‘destinationTable’, ‘Tables should have same number of rows’);

 

See Also