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 |
dizzy1
Starting Member
1 Post |
Posted - 2007-09-06 : 05:30:19
|
Im searching in a database through ASP in a field called description which has a sentance e.g. "This is a video of a brick layer laying brick" , i need to do a search so when i search for "brick" or "bicks" that particular sentance appears insteasd of all of them appearing this is what i have so far.sqlStatment = sqlStatment + "SELECT * FROM Videos " sqlStatment = sqlStatment + "WHERE Description = '%"& varsearch1 &"%'"I can do other searches when the field only has 1 word, but i need it to search through multiple words and find that one. |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-09-06 : 05:44:14
|
Maybe you shold try out FULLTEXT search? E 12°55'05.25"N 56°04'39.16" |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2007-09-10 : 10:11:47
|
Hi dizzy1,Could u tell exactly what u need? U want to search by more than one word ?or U want to get back the particular sentence containing a word ?Also note that ur SQL may not work because of the = operator, instead u have to put "Like"U may trysqlStatment = sqlStatment + "SELECT * FROM Videos " sqlStatment = sqlStatment + "WHERE Description Like '%"& varsearch1 &"%'" or Description Like '%"& varsearch2 &"%'" Srinika |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
|
|
|
|