Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

example of FREETEXTTABLE (Transact-SQL

Posted on 2011-03-12
6
Medium Priority
?
858 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 664 total points
ID: 35115562
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 1336 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 1336 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

705 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