Assert procedure that takes actual and expected SQL_VARIANT values (a data type that stores values of various SQL Server-supported data types), compares them for equality and report failure if they are not equal. 

Note: If actual or expected, or both values are NULL then assert will fail. 


  • V_ActualValue - actual value, SQL_VARIANT
  • V_ExpectedValue - expected value, SQL_VARIANT
  • v_UserMessage – message to report when assertion fails, NVARCHAR(MAX)



SQL Server

      EXEC DBTD_ASSERT_SQLVARIANT_ARE_EQUAL '123456789', 123456789, 'Try this code and check the result';


See Also