Word Doc in SQL Server!

  • Hi All

    I wish to store a word document in SQL Server. I should be able to search on the content. e.g. Select Content from DocTable where content like '%this doc is good%'.

    I want to retain basic formatting like old,underline , italics.

    Is there a way to achieve this without saving the document as HTML?

    Thanks

    Online Trainer For SQL DBA and Developer @RedBushTechnologies with 18 yrs exp.

  • S_Kumar_S (5/14/2013)


    Hi All

    I wish to store a word document in SQL Server. I should be able to search on the content. e.g. Select Content from DocTable where content like '%this doc is good%'.

    I want to retain basic formatting like old,underline , italics.

    Is there a way to achieve this without saving the document as HTML?

    Thanks

    you'll want to use Full text indexing, which has the option to scan various types of documents: you definitely don't reinvent the wheel when someone has built a race car for the same issue.

    as far as formatting goes, the formatting in the document is still in place, but it's broken up into search words;

    not sure what it is you are after as far as formatting goes.

    http://msdn.microsoft.com/en-us/library/ms142571.aspx

    Filters. Some data types require filtering before the data in a document can be full-text indexed, including data in varbinary, varbinary(max), image, or xml columns. The filter used for a given document depends on its document type. For example, different filters are used for Microsoft Word (.doc) documents, Microsoft Excel (.xls) documents, and XML (.xml) documents. Then the filter extracts chunks of text from the document, removing embedded formatting and retaining the text and, potentially, information about the position of the text. The result is a stream of textual information. For more information, see Configure and Manage Filters for Search.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • S_Kumar_S (5/14/2013)


    Hi All

    I wish to store a word document[/url] in SQL Server. I should be able to search on the content. e.g. Select Content from Word Doc[/url]Table where content like '%this doc is good%'.

    I want to retain basic formatting like old,underline , italics.

    Is there a way to achieve this without saving the document as HTML?

    Thanks

    You want to make the search key words contain basic formatting? like this,:w00t:

    http://msdn.microsoft.com/en-us/library/office/aa211953%28v=office.11%29.aspx

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply