Import Blocks of Data into db Fields

  • I have a text file with multiple blocks of data (like address blocks) separated from each other by a blank line. How can I import each line of each block into a SQL database table that has defined fields?

    Thanks.

  • Can you give me an example of what is in the file. Not sure I understand. Also please don't cross-post.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • Sorry for the cross-post...it was my first time.

    Here is an example of the multiple blocks of data:

    DOJ

    Justice Management Division

    Procurement Services Staff (PSS)

    R -- Administrative Support Services

    Synopsis

    http://www.eps.gov/spg/DOJ/JMD/PSS/JLENR-02-0189/listing.html

    DOJ

    Bureau of Prisons

    Acquisitions Branch

    G--Residential Comprehensive Sanctions Center

    Amendment 01

    http://www.eps.gov/spg/DOJ/BPR/PPB/RFP200-0727-NE/listing.html

  • Gotcha. Will have to look a bit for it but you will need to use a DTS package or job with active scripting to read each line and put in the proper place. You might fidn a piece on http://www.planet-source-code.com or any source code site for VB or VBScript that will work. Look around for examples of using filesystemobjects. I just don't have anything quick on hand.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

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

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