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
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AartiPosted Nov 18, 2011, 7:50 AM
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.
Abhimanyu K VatsaPosted Oct 8, 2011, 9:05 AM
http://www.sqlservercentral.com/Forums/Topic472242-9-1.aspx
http://itknowledgeexchange.techtarget.com/itanswers/how-to-find-a-specific-word-in-a-sql-table/