Solved

example of FREETEXTTABLE (Transact-SQL

Posted on 2011-03-12
6
805 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
  • 3
  • 2
6 Comments
 
LVL 13

Assisted Solution

by:agarwalrahul
agarwalrahul 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now