Link to home
Start Free TrialLog in
Avatar of VBdotnet2005
VBdotnet2005Flag for United States of America

asked on

T-sql - contain?

In VB there is a ".contain" method to check to see if a string contains a char or a word we are looking for. Like if mystring.contains(",") then ...   In T-Sql is there such a method?
Avatar of VBdotnet2005
VBdotnet2005
Flag of United States of America image

ASKER

or to check if exist
SELECT CHARINDEX('bicycle', [ProductDesc]) FROM Products
If this returns a number greater than 1, then the string was found ...


Little typo in the last comment ... if it returns a number greater than 0 ... the it was found
ASKER CERTIFIED SOLUTION
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial