I'd like to be able to check if a parameter contains a particular word.
For example:
@ContactName VARCHAR(50)
IF CONTAINS(@ContactName, 'Temp')
I'd like to be able to check if a parameter contains a particular word.
For example:
@ContactName VARCHAR(50)
IF CONTAINS(@ContactName, 'Temp')
if CHARINDEX('Temp',@ContactName) > 0
CHARINDEX() This function is used to search for a specific word or a substring in an overall string and returns its starting position of match. In case no word is found, then it will return 0 (zero).