Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ranjeetsingh_6
Posting Yak Master
125 Posts |
Posted - 2006-07-19 : 04:06:03
|
HiI have a string varchar variable @word and store in it this string "asde adsf afsdrh asjfktg ncdjft jfjgtkg kkglll" and want to search in this string a single word .How i can do it .Please give me that solution which search a word and Time take minimum for search. Ranjeet Kumar Singh |
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-07-19 : 04:26:28
|
Somthing like this Declare @Word VarcharSet @Word = 'asde adsf afsdrh asjfktg ncdjft jfjgtkg kkglll'if (@Word Like '%a%') print 'Yes'Else print 'no'-- Alternative Method. if (CharINdex(@Word,'%a%')>0)print 'yes'else print 'no' Chirag |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
Posted - 2006-07-19 : 06:17:29
|
You might also want to look into full text searching functionality...http://www.sqlteam.com/item.asp?ItemID=114http://www.databasejournal.com/features/mssql/article.php/3441981Ryan Randallwww.monsoonmalabar.com London-based IT consultancy Solutions are easy. Understanding the problem, now, that's the hard part. |
|
|
|
|
|