Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exact Contains Search

Status
Not open for further replies.

jarla

Programmer
Jan 2, 2001
34
FI
Hello, professionals ;)
We have Sql Server 2000 in our server and it have over 300.000 rows with comma-delimited list of keywords. We use contains -search because LIKE -search is too slow. Database handles picture information. But now we have big problem. This search:

SELECT ID
FROM imagedatabase
WHERE Contains(categories, ' "moss" ')

worked good earlier, but now we add lot of image-information that had photographer´s name in categories -field. Name can be for example "peter moss". How can I make a query that DON´T take "peter moss" to the query when I search just a word "moss"?
With LIKE -query I can write that it should contain "," before the word (all words are delimited by commas) but with faster Contains -search I haven´t make it work :(. Help!
 
If you look up in BOL you can have NEAR as a proximity So and I have not tested this logic says NOT NEAR should be possible
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top