Checks that actual value IS NOT NULL and report failure if actual value is NULL.

 Arguments

  • V_ActualValue - actual value, Variable Character(4000).
  • v_UserMessage – message to report when assertion fails, Variable Character (255) in Oracle and Netezza, NVARCHAR(MAX) in SQL Server.

 

Examples

SQL Server

CREATE PROCEDURE UT_DBTD_CheckThatCustomerNameIsNotNull
AS
BEGIN
   DECLARE @v_CustomerName VARCHAR(500);
   DECLARE @v_UnknownCustomer INT = 123456789;
   SET @v_CustomerName = dbo.fnGetCustomerName(@v_UnknownCustomer);

   EXEC DBTD_ASSERT_IS_NOT_NULL @v_CustomerName, 'Customer name should not be NULL'
END;
GO

 

See Also