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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Querying the full text catalog for words of a particular row

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-07-02 : 07:25:40
Mukunda writes "Is there a way to query the catalog for words of a particular row. This we need for a search where we want to provide an option to select related words. This would mean that if somebody searches for a word, we want to provide a list of words which can be included to narrow down the search within the result set."

X002548
Not Just a Number

15586 Posts

Posted - 2003-07-02 : 10:33:09
I think you need to build a UDF that splist all of the words into individual comonents.

For the SQL wouldn't you just do

WHERE col1 LIKE '%searchword%'



Brett

8-)
Go to Top of Page

monkeybite
Posting Yak Master

152 Posts

Posted - 2003-07-02 : 11:27:09
When you set up full-text indexing on a table, you have to provide a primary key to the table. The table-valued functions CONTAINSTABLE and FREETEXTTABLE return a field called [Key], so you can limit your search to a single row if you know the primary key value for the row. Like this:

SELECT t.*
FROM FREETEXTTABLE([News], *, 'test text') AS [t]
WHERE [Key] = 20


Does this answer your question? I'm not really clear on what you're asking.
~ monkey



Edited by - monkeybite on 07/02/2003 11:28:43
Go to Top of Page
   

- Advertisement -