hello ,
how to search a word in string
i have string and i want to search a word in this string so how to do in sql
then show its ture or false when true then find or false then not found
so give me idea or some code
thansk
How to search the word in string in sql
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Abhimanyu K VatsaRank #14 · 51.7K reputationPosted Oct 8, 2011, 5:05 AM EDT
http://www.sqlservercentral.com/Forums/Topic472242-9-1.aspx
http://itknowledgeexchange.techtarget.com/itanswers/how-to-find-a-specific-word-in-a-sql-table/
AartiRank #2,383 · 594 reputationPosted Nov 18, 2011, 2:50 AM EST
In SQL Server, you can use four-part names in CONTAINS or FREETEXT full-text predicates to execute queries against linked servers.
CONTAINS can search for:
A word or phrase.
The prefix of a word or phrase.
A word near another word.
A word inflectionally generated from another (for example, the word drive is the inflectional stem of drives, drove, driving, and driven).
A word that is a synonym of another word using a thesaurus (for example, the word metal can have synonyms such as aluminum and steel).
try with below code.
DECLARE @SearchWord varchar(30);
SET @SearchWord ='performance';
SELECT string
FROM Employee
WHERE CONTAINS(string, @SearchWord);
Thanks.