Parsing Text into a SQL DB table

  • Hello! I have a weekly tab delimited file that is currently being parsed row by row in .net code and then inserted into a new table. The table created has 503 columns with varying row counts from week to week. The current process takes way to long because each row is parsed one by one.

    I'm looking desperately for a quicker way to accomplish this process.

    Ingredients:

    1. Tab delimited text file

    2. MS SQL Server database

    3. Program is run .Net

    Has anyone run across a similar situation or can anyone suggest a time efficient way to get this done?

    Thanks in advance for any help!

  • BCP, check it out in Books Online.

  • Along with bulk copy you could also use an SSIS package. might take a little work but you can also do some data transformation with the ssis package as well. look at both and see which better meets your needs.


    For faster help in answering any problems Please read How to post data/code on a forum to get the best help - Jeff Moden[/url] for the best way to ask your question.

    For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]

    Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
    Jeff Moden's Cross tab and Pivots Part 1[/url]
    Jeff Moden's Cross tab and Pivots Part 2[/url]

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

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