Using a prefix with Full Text Search in Microsoft Sql Server 2005

I remember a long time ago having problems with trying to run a query in Sql Server 2k FTS where I had something like:

SELECT COL1, COL2, COL3 FROM TABLE WHERE CONTAINS(COL1, 'TERM*')

I wanted the rows where a word came back that started with TERM.  I never ever could get back what I wanted.  In reading the documentation for Sql Server 2005 Full Text Search, it looks like I should have queried something like:

SELECT COL1, COL2, COL3 FROM TABLE WHERE CONTAINS(COL1, '"TERM*"')

Note the double quotes.

Wally

No Comments