I thought it was CONTAINS, but that\'s not working for me.
CONTAINS
I\'m looking to do this:
IF CONTAINS(@stringVar, \'thisstring\') ... <
IF CONTAINS(@stringVar, \'thisstring\') ...
Instead of LIKE (which does work as other commenters have suggested), you can alternatively use CHARINDEX:
LIKE
CHARINDEX
declare @full varchar(100) = 'abcdefg' declare @find varchar(100) = 'cde' if (charindex(@find, @full) > 0) print 'exists'