create fixed width file using BCP

  • Ok... I get it... David Burrows beat me to the punch... take a look at his posting... I think that may be what you want.  When you re-import, you'll probably need to make a format file.  Based on everything I've seen, so far, you should be able to export or reimport at a rate of about 10K rows per second (.6 million rows per minute).

    If you need to control the individual columns widths of the output, you'll need a control file for the BCP output, as well (or you can brute force conversion in the output query or view).

    --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 post 16 (of 15 total)

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