Trying to store large text from a file

  • Please excuse me if this has been covered before but my internet connection at work is exptremely slow so I can't do the search today.

    I am working with SQL Server 2000 and need to bring in data from a report and store only a couple of pieces from it. For example: Although this is not the actual data I am using it will still give you an idea what I am trying to do.

    Report example:

    **** Cars of America ****

    MAKE MODEL YEAR

    Ford Mustang 2010

    DESCRIPTION

    The Ford Mustang is a classic example of how a car should be made ..... blah blah blah

    MAKE MODEL YEAR

    Chevy Camaro 2010

    DESCRIPTION

    The new Chevy Camaro has the posibility of being a showstopper for .... blah blah blah

    MAKE MODEL YEAR

    ...

    ...

    ... etc etc etc

    The actual report I am working with is about 7MB in size and the description field varies in size. What I need to do is strip out 2 pieces of data. Using the example from above lets say I want to find just the MAKE and the DESCRIPTION and then store these values in a table with a MAKE field (VARCHAR(20)) and a DESCRIPTION field (text).

    I was thinking about doing a bulk insert into a temp table and then parsing the text to find the key words but for the life of me I can't get the entire document to go into a temp table.

    Anybody ever done anything like this?

  • The description provided so far is not as clear as it would be required to really help you...

    What do you mean by "need to bring in data from a report"? Is it a file? If so, what format (txt,xls,word)?

    It would help a lot more if you could attach a sample file holding the data in a pattern you have to deal with and provide your expected result.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

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

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