Verifies that provided SQL query is failing. Report failure when provided SQL query runs successfully. 

Arguments

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

 

Examples

SQL Server  

      EXEC DBTD_ASSERT_WILL_FAIL 'select a from', 'Query should fail because FROM clause have no specified';

Oracle  

      DBTD_ASSERT_WILL_FAIL ('select a from', 'Query should fail because FROM clause have no specified');

Netezza  

      CALL DBTD_ASSERT_WILL_FAIL ('select a from', 'Query should fail because FROM clause have no specified');

 

See Also