tags:

views:

55

answers:

1

When i attach a Northwind database(using sp_attach_db) to SQL server 2005 ,it finished successfully. but when i run this query

SELECT FT_TBL.Description, 
   FT_TBL.CategoryName, 
   KEY_TBL.RANK
FROM Categories AS FT_TBL INNER JOIN
   CONTAINSTABLE (Categories, Description, 
      '("sweet and savory" NEAR sauces) OR
      ("sweet and savory" NEAR candies)'
      , 10
   ) AS KEY_TBL
   ON FT_TBL.CategoryID = KEY_TBL.[KEY]

it is giving me this error

"Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'Categories' because it is not full-text indexed."

what will be the possible solution? Do we Need to create a Full -Text index?

please help me thanks in advance

+2  A: 

Yes, in order to use CONTAINSTABLE the table needs to have a Full-Text Index defined on it.

Roberto Hernandez
Thank you very much ,i have created it ....it is working fine
Anoop