Solved

example of FREETEXTTABLE (Transact-SQL

Posted on 2011-03-12
6
808 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
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.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

911 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

18 Experts available now in Live!

Get 1:1 Help Now