Looks for a pattern within the string and will fail if specified patter were not found. 


  • v_Pattern - An expression that contains the pattern string to be found, NVARCHAR(MAX)
  • v_String - String that is searched for the specified pattern. NVARCHAR(MAX)
  • v_UserMessage – message to report when assertion fails, NVARCHAR(MAX)



SQL Server

      EXEC DBTD_ASSERT_STRING_CONTAINS '%aaa%', '1111aaabbbbcccc', 'We have issues';


See Also