Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello all,

I want to build a Freetext query in sql server 2005 which returns some portion of the text around the matching criteria (word/phrase). That is, if i search for say, "valuable asset", the result should be something like "....positive attitude is the most valuable asset of a person, which....".

The column contains files of MS office 2007 (docx, pptx, xlsx,etc), html, txt and pdf formats.

Any suggestions?
Posted
Comments
Herman<T>.Instance 18-Jul-11 10:49am    
suggestions....
will in your where clause a LIKE statement.
AND compare by casting to var_binary to seek in office docments.
GeoNav 19-Jul-11 12:21pm    
I am sorry, but I did not follow your suggestion. I am able to find the documents matching the query. My requirement is to extract some text of the document where the search criteria is found.
dr.kitanjal 28-Nov-11 14:15pm    
Please learn about full text index and use them

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900