Solved

example of FREETEXTTABLE (Transact-SQL

Posted on 2011-03-12
6
846 Views
Last Modified: 2012-08-14
Hi experts, i am reading about FREETEXTTABLE (Transact-SQL)
http://msdn.microsoft.com/en-us/library/ms177652.aspx

but i need an example
unfortunately the example of Microsoft's site does not work. I make it work? or have another example?

this is my code
EXEC sp_fulltext_database 'enable'
EXEC sp_fulltext_catalog 'Cat_Catalog_Categories', 'create'
EXEC sp_fulltext_table 'dbo.Categories', 'create', 'Cat_Catalog_Categories', 'PK_Categories'
EXEC sp_fulltext_column 'dbo.Categories', 'Description', 'add'

USE Northwind;
SELECT FT_TBL.CategoryName
    ,FT_TBL.Description
    ,KEY_TBL.RANK
FROM dbo.Categories AS FT_TBL
    INNER JOIN FREETEXTTABLE(dbo.Categories, Description,
        'sweetest candy bread and dry meat') AS KEY_TBL
        ON FT_TBL.CategoryID = KEY_TBL.[KEY];

does not return any results
categories.jpg
0
Comment
Question by:enrique_aeo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 13

Assisted Solution

by:Rahul Agarwal
Rahul Agarwal earned 166 total points
ID: 35115562
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 334 total points
ID: 35122075
>>unfortunately the example of Microsoft's site does not work. I make it work? or have another example?<<
You do not appear to have populated the index.
0
 

Author Comment

by:enrique_aeo
ID: 35125218
acperkins, i do not understand
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 334 total points
ID: 35139882
You created the index, bu you have not populated it, so at the very least you are missing this step:
EXEC sp_fulltext_catalog ''Cat_Catalog_Categories', 'start_full';
0
 

Author Comment

by:enrique_aeo
ID: 35153603
ok, the example complete is
EXEC sp_fulltext_database 'enable'
EXEC sp_fulltext_catalog 'Cat_Catalog_Categories', 'create'
EXEC sp_fulltext_catalog 'Cat_Catalog_Categories', 'start_full';
EXEC sp_fulltext_table 'dbo.Categories', 'create', 'Cat_Catalog_Categories', 'PK_Categories'
EXEC sp_fulltext_column 'dbo.Categories', 'Description', 'add'

select * from dbo.Categories

USE Northwind;
SELECT FT_TBL.CategoryName
    ,FT_TBL.Description
    ,KEY_TBL.RANK
FROM dbo.Categories AS FT_TBL
    INNER JOIN FREETEXTTABLE(dbo.Categories, Description,
        'sweetest candy bread and dry meat') AS KEY_TBL
        ON FT_TBL.CategoryID = KEY_TBL.[KEY];
GO
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 35153819
>>ok, the example complete is<<
Actually you are missing the step where you wait until the Full Population completes...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question