Reading txt file then creating new table

  • BCP has -F option to skip row(s).  -F2 to start from 2nd row so you do not need delete the first row (column header) each time.

    bulk insert has firstrow option to specify from which row to start.

    Like John said, you do need a format for data itself.

  • I might MOVE the file to an "archive" directory, but I wouldn't delete it until I was sure the server had gone through a backup cycle.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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