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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Search procedure

Author  Topic 

PeteLeHoq
Starting Member

37 Posts

Posted - 2011-05-21 : 17:34:10
Hey all,

I've been researching and testing a basic search sql procedure for a sql server 2008 driven site. But struggling, can anyone point me in the direction of some good examples or some sample statements.

The search needs to lookup text, but needs to match words in the search string against those in the db. I've been going along the lines of WHERE LIKE, then moved onto CONTAINS and FREETEXT, the later two are seem good for multiple phrases but not the plural issue as per below.

For example:

Search is: Apples
db would find Apple.

At the same time it needs to match against multiple search words, eg. Apple Pears Oranges.

Would also be good if it suggested search terms if it did'nt find anything.

Many Thanks.

   

- Advertisement -