Question

i want to write a query with Full-Text-Search on a column with varbinary(max) type that stored a .doc/.docx(MS-Word) file. my query must returns records that contain a word in stored file.

is this possible?

if yes,how?(please write an example)

if yes,can we write that for other language(e.g Arabic,Persian or a UniCode characters)?

thank you beforehand.

Was it helpful?

Solution

What you're looking for is fulltext indexing, which has been greatly improved in SQL Server 2008.

For an introduction, I would recommend checking out these articles here:

Once you understand this and have created your own fulltext catalog, you should be able to search something like this:

SELECT ID, (other fields), DocumentColumn
FROM dbo.YourTable
WHERE CONTAINS(*, 'Microsoft Word')

And yes, Fulltext indexing and searching does support lots of languages - check out the links I've sent you and the SQL Server 2008 Books Online for details!

Marc

OTHER TIPS

If you have SQL Server 2005 or later, yes, you just need the filters:

http://www.microsoft.com/downloads/details.aspx?FamilyId=60C92A37-719C-4077-B5C6-CAC34F4227CC&displaylang=en

If you have SQL Server 2000, doc files can be indexed, but not the newer Office 2007 format as far as I know (I've heard you may be able to borrow the IFilter by installing Word 2007 on the server).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top